using tini to reap zombie processes

This commit is contained in:
Julien Neuhart
2019-09-30 20:17:39 +02:00
parent 7f61c63425
commit cbc9d9ab8c
2 changed files with 19 additions and 5 deletions

View File

@@ -29,6 +29,23 @@ COPY cmd ./cmd
# Build our binary.
RUN go build -o gotenberg -ldflags "-X main.version=${VERSION}" cmd/gotenberg/main.go
FROM thecodingmachine/gotenberg:base
LABEL authors="Julien Neuhart <j.neuhart@thecodingmachine.com>"
# |--------------------------------------------------------------------------
# | Tini
# |--------------------------------------------------------------------------
# |
# | An helper for reaping zombie processes.
# |
ARG TINI_VERSION
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini
ENTRYPOINT ["/tini", "--"]
# |--------------------------------------------------------------------------
# | Final touch
# |--------------------------------------------------------------------------
@@ -36,10 +53,6 @@ RUN go build -o gotenberg -ldflags "-X main.version=${VERSION}" cmd/gotenberg/ma
# | Last instructions of this build.
# |
FROM thecodingmachine/gotenberg:base
LABEL authors="Julien Neuhart <j.neuhart@thecodingmachine.com>"
COPY --from=workspace /gotenberg/package/gotenberg /usr/local/bin/
USER gotenberg