mirror of
https://github.com/kaiju/docker-gophernicus.git
synced 2025-08-05 16:48:38 +00:00
Add Dockerfile
This commit is contained in:
parent
d368a439db
commit
9b1dd36c2d
3 changed files with 62 additions and 1 deletions
19
Dockerfile
Normal file
19
Dockerfile
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
FROM alpine:latest AS builder
|
||||||
|
|
||||||
|
ARG XINETD_VERSION=2.3.15.4
|
||||||
|
ARG VERSION=3.0.1
|
||||||
|
|
||||||
|
RUN apk add build-base autoconf automake libtool pkgconf git
|
||||||
|
RUN git clone -b ${XINETD_VERSION} https://github.com/openSUSE/xinetd.git
|
||||||
|
RUN cd xinetd && sh ./autogen.sh && ./configure && make
|
||||||
|
RUN git clone -b ${VERSION} https://github.com/gophernicus/gophernicus.git
|
||||||
|
RUN cd gophernicus && make
|
||||||
|
|
||||||
|
FROM alpine:latest
|
||||||
|
EXPOSE 70/tcp
|
||||||
|
VOLUME /var/gopher
|
||||||
|
COPY --from=builder /xinetd/xinetd /usr/sbin
|
||||||
|
COPY --from=builder /gophernicus/gophernicus /usr/sbin
|
||||||
|
COPY xinetd.conf /etc/xinetd.conf
|
||||||
|
|
||||||
|
CMD ["/usr/sbin/xinetd", "-dontfork"]
|
23
README.md
23
README.md
|
@ -1,2 +1,23 @@
|
||||||
# docker-gophernicus
|
# docker-gophernicus
|
||||||
An Alpine based Gophernicus Gopher server Docker image
|
|
||||||
|
An Alpine Linux based Docker image for the Gophernicus Gopher server (https://github.com/gophernicus/gophernicus).
|
||||||
|
|
||||||
|
Do you just want to run a simple Gopher service? Do you not want to mess the hassle of setting up old-school inetd/xinetd/systemd sockets/etc? Are you already running all your other services as containers? Well so did I!
|
||||||
|
|
||||||
|
This image runs Gophernicus via xinetd on an Alpine Linux base for a Docker image that weighs in at just a smidge under 7MB. Set your hostname, point your favorite volume at `/var/gopher`, bind port 70 and go!
|
||||||
|
|
||||||
|
ex:
|
||||||
|
```
|
||||||
|
docker build -t gophernicus .
|
||||||
|
|
||||||
|
docker run --name gophernicus \
|
||||||
|
--hostname <your gopher hostname> \
|
||||||
|
-p 70:70 \
|
||||||
|
-v <your gopher root>:/var/gopher \
|
||||||
|
gophernicus
|
||||||
|
```
|
||||||
|
|
||||||
|
## TODO
|
||||||
|
|
||||||
|
- Logging to stdout
|
||||||
|
- Configuration via environment variables
|
||||||
|
|
21
xinetd.conf
Normal file
21
xinetd.conf
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
defaults
|
||||||
|
{
|
||||||
|
instances = 25
|
||||||
|
log_type = FILE /var/log/servicelog
|
||||||
|
log_on_success = HOST PID
|
||||||
|
log_on_failure = HOST
|
||||||
|
}
|
||||||
|
|
||||||
|
# default: on
|
||||||
|
# description: Gophernicus - Modern full-featured gopher server
|
||||||
|
service gopher
|
||||||
|
{
|
||||||
|
socket_type = stream
|
||||||
|
protocol = tcp
|
||||||
|
port = 70
|
||||||
|
wait = no
|
||||||
|
user = nobody
|
||||||
|
server = /usr/sbin/gophernicus
|
||||||
|
server_args = -r /var/gopher
|
||||||
|
disable = no
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue