mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-18 13:12:17 +01:00
using tini to reap zombie processes
This commit is contained in:
3
Makefile
3
Makefile
@@ -5,6 +5,7 @@ DOCKER_PASSWORD=
|
|||||||
DOCKER_REPOSITORY=thecodingmachine
|
DOCKER_REPOSITORY=thecodingmachine
|
||||||
GOLANGCI_LINT_VERSION=1.19.1
|
GOLANGCI_LINT_VERSION=1.19.1
|
||||||
CODE_COVERAGE=0
|
CODE_COVERAGE=0
|
||||||
|
TINI_VERSION=v0.18.0
|
||||||
MAXIMUM_WAIT_TIMEOUT=30.0
|
MAXIMUM_WAIT_TIMEOUT=30.0
|
||||||
MAXIMUM_WAIT_DELAY=10.0
|
MAXIMUM_WAIT_DELAY=10.0
|
||||||
MAXIMUM_WEBHOOK_URL_TIMEOUT=30.0
|
MAXIMUM_WEBHOOK_URL_TIMEOUT=30.0
|
||||||
@@ -48,7 +49,7 @@ doc:
|
|||||||
# build Gotenberg Docker image.
|
# build Gotenberg Docker image.
|
||||||
image:
|
image:
|
||||||
make workspace
|
make workspace
|
||||||
docker build --build-arg VERSION=$(VERSION) -t $(DOCKER_REPOSITORY)/gotenberg:$(VERSION) -f build/package/Dockerfile .
|
docker build --build-arg VERSION=$(VERSION) --build-arg TINI_VERSION=$(TINI_VERSION) -t $(DOCKER_REPOSITORY)/gotenberg:$(VERSION) -f build/package/Dockerfile .
|
||||||
|
|
||||||
# start the API using previously built Docker image.
|
# start the API using previously built Docker image.
|
||||||
gotenberg:
|
gotenberg:
|
||||||
|
|||||||
@@ -29,6 +29,23 @@ COPY cmd ./cmd
|
|||||||
# Build our binary.
|
# Build our binary.
|
||||||
RUN go build -o gotenberg -ldflags "-X main.version=${VERSION}" cmd/gotenberg/main.go
|
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
|
# | Final touch
|
||||||
# |--------------------------------------------------------------------------
|
# |--------------------------------------------------------------------------
|
||||||
@@ -36,10 +53,6 @@ RUN go build -o gotenberg -ldflags "-X main.version=${VERSION}" cmd/gotenberg/ma
|
|||||||
# | Last instructions of this build.
|
# | 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/
|
COPY --from=workspace /gotenberg/package/gotenberg /usr/local/bin/
|
||||||
|
|
||||||
USER gotenberg
|
USER gotenberg
|
||||||
|
|||||||
Reference in New Issue
Block a user