Browse Source

change default user and use supervisor

pull/233/head
Jan Christian Grünhage 7 years ago
parent
commit
e44cccb91d
  1. 17
      Dockerfile
  2. 1
      docker/root/etc/s6.d/.s6-svscan/finish
  3. 1
      docker/root/etc/s6.d/go-neb/finish
  4. 3
      docker/root/etc/s6.d/go-neb/run

17
Dockerfile

@ -12,12 +12,21 @@ RUN apk add --no-cache -t build-deps git gcc musl-dev go \
# Run go-neb
FROM alpine:3.7
ENV BIND_ADDRESS=:4050 DATABASE_TYPE=sqlite3 DATABASE_URL=/data/go-neb.db?_busy_timeout=5000
ENV BIND_ADDRESS=:4050 \
DATABASE_TYPE=sqlite3 \
DATABASE_URL=/data/go-neb.db?_busy_timeout=5000 \
UID=1337 \
GID=1337
COPY --from=builder /tmp/go-neb/bin/go-neb /go-neb
RUN apk add --no-cache ca-certificates
COPY --from=builder /tmp/go-neb/bin/go-neb /usr/local/bin/go-neb
RUN apk add --no-cache \
ca-certificates \
su-exec \
s6
VOLUME /data
EXPOSE 4050
ENTRYPOINT ["/go-neb"]
COPY docker/root /
ENTRYPOINT ["/bin/s6-svscan", "/etc/s6.d/"]

1
docker/root/etc/s6.d/.s6-svscan/finish

@ -0,0 +1 @@
#!/bin/sh

1
docker/root/etc/s6.d/go-neb/finish

@ -0,0 +1 @@
#!/bin/sh

3
docker/root/etc/s6.d/go-neb/run

@ -0,0 +1,3 @@
#!/bin/sh
chown -R ${UID}:${GID} /data
exec su-exec ${UID}:${GID} /usr/local/bin/go-neb
Loading…
Cancel
Save