mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-15 20:02:15 +01:00
huge refactoring
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
ARG GOLANG_VERSION
|
||||
|
||||
# |--------------------------------------------------------------------------
|
||||
# | Binary
|
||||
# |--------------------------------------------------------------------------
|
||||
@@ -7,7 +5,7 @@ ARG GOLANG_VERSION
|
||||
# | Buils Gotenberg binary.
|
||||
# |
|
||||
|
||||
FROM golang:${GOLANG_VERSION}-stretch AS golang
|
||||
FROM thecodingmachine/gotenberg:workspace AS workspace
|
||||
|
||||
ARG VERSION
|
||||
|
||||
@@ -16,7 +14,7 @@ ENV GOOS=linux \
|
||||
CGO_ENABLED=0
|
||||
|
||||
# Define our workding outside of $GOPATH (we're using go modules).
|
||||
WORKDIR /gotenberg
|
||||
WORKDIR /gotenberg/package
|
||||
|
||||
# Copy our source code.
|
||||
COPY internal ./internal
|
||||
@@ -25,7 +23,7 @@ COPY go.sum go.sum
|
||||
COPY go.mod go.mod
|
||||
|
||||
# Build our binary.
|
||||
RUN go build -o /gotenberg/gotenberg -ldflags "-X main.version=${VERSION}" cmd/gotenberg/main.go
|
||||
RUN go build -o gotenberg -ldflags "-X main.version=${VERSION}" cmd/gotenberg/main.go
|
||||
|
||||
# |--------------------------------------------------------------------------
|
||||
# | Final touch
|
||||
@@ -38,9 +36,8 @@ FROM thecodingmachine/gotenberg:base
|
||||
|
||||
LABEL authors="Julien Neuhart <j.neuhart@thecodingmachine.com>"
|
||||
|
||||
COPY --from=golang /gotenberg/gotenberg /usr/local/bin/
|
||||
COPY --from=workspace /gotenberg/package/gotenberg /usr/local/bin/
|
||||
|
||||
ENV PM2_HOME=/gotenberg/.pm2
|
||||
USER gotenberg
|
||||
WORKDIR /gotenberg
|
||||
|
||||
|
||||
Reference in New Issue
Block a user