This commit is contained in:
+3
-2
@@ -11,8 +11,9 @@ RUN go mod download
|
||||
# Copy source code
|
||||
COPY . .
|
||||
|
||||
# Build statically
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags='-w -s' -o mdhost .
|
||||
# Build statically with version
|
||||
ARG APP_VERSION=dev
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-w -s -X main.version=${APP_VERSION}" -o mdhost .
|
||||
|
||||
# Final scratch image
|
||||
FROM scratch
|
||||
|
||||
Reference in New Issue
Block a user