🐛 fix: Dockerfile.prod.template to build binary during Docker build
This commit is contained in:
@@ -2,9 +2,13 @@
|
|||||||
# Minimal image using pre-built binary from CI cache
|
# Minimal image using pre-built binary from CI cache
|
||||||
# Template: Replace {{DEPS_HASH}} with actual dependency hash
|
# Template: Replace {{DEPS_HASH}} with actual dependency hash
|
||||||
|
|
||||||
# Use the build cache image as base
|
# Use the build cache image as base for building
|
||||||
FROM gitea.arcodange.lab/arcodange/dance-lessons-coach-build-cache:{{DEPS_HASH}} AS builder
|
FROM gitea.arcodange.lab/arcodange/dance-lessons-coach-build-cache:{{DEPS_HASH}} AS builder
|
||||||
|
|
||||||
|
# Set working directory and build the binary
|
||||||
|
WORKDIR /workspace
|
||||||
|
RUN go build -o dance-lessons-coach ./cmd/server
|
||||||
|
|
||||||
# Final minimal image
|
# Final minimal image
|
||||||
FROM alpine:3.18
|
FROM alpine:3.18
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user