Skip to content

Commit

Permalink
Best use entry point, more versatile
Browse files Browse the repository at this point in the history
  • Loading branch information
nuriel77 committed Dec 11, 2019
1 parent fc223d5 commit 5317d06
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
latest-export.gz.bin
.github
.git
Dockerfile
DOCKER.md
README.md
.dockerignore
docker-compose.yml
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ ENV TINI_VERSION v0.18.0
# Tini is excellent: https://github.com/krallin/tini#why-tini
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-static /tini
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-static.asc /tini.asc
ADD entrypoint.sh /entrypoint.sh

COPY --from=builder ["/go/src/github.com/gohornet/hornet/hornet", "/go/src/github.com/gohornet/hornet/config.json", "/app/"]
RUN apk --no-cache add ca-certificates gnupg\
&& addgroup --gid 39999 hornet\
&& adduser -h /app -s /bin/sh -G hornet -u 39999 -D hornet\
&& chmod +x /tini /app/hornet\
&& chmod +x /tini /app/hornet /entrypoint.sh\
&& chown hornet:hornet -R /app\
&& gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 595E85A6B1B4779EA4DAAEC70B588DFF0527A9B7\
&& gpg --batch --verify /tini.asc /tini
Expand All @@ -30,5 +31,4 @@ RUN apk --no-cache add ca-certificates gnupg\
# Source: https://docs.docker.com/network/host/

USER hornet
ENTRYPOINT ["/tini", "--"]
CMD ["/app/hornet"]
ENTRYPOINT ["/entrypoint.sh"]
3 changes: 3 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

/tini -- /app/hornet $@

0 comments on commit 5317d06

Please sign in to comment.