fix(docker): update build command for improved timestamp format and readability
This commit is contained in:
parent
96808d531a
commit
eacf675671
@ -20,9 +20,11 @@ RUN go mod download
|
||||
COPY . .
|
||||
|
||||
# Build the binary with version and build time
|
||||
RUN BUILD_TIME=$(date -u +"%Y-%m-%d %H:%M:%S") && \
|
||||
go build -ldflags="-s -w -X 'github.com/perfect-panel/server/pkg/constant.Version=${VERSION}' -X 'github.com/perfect-panel/server/pkg/constant.BuildTime=${BUILD_TIME}'" -o /app/ppanel ppanel.go
|
||||
|
||||
RUN BUILD_TIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ") && \
|
||||
go build -ldflags "-s -w \
|
||||
-X github.com/perfect-panel/server/pkg/constant.Version=${VERSION} \
|
||||
-X github.com/perfect-panel/server/pkg/constant.BuildTime=${BUILD_TIME}" \
|
||||
-o /app/ppanel ppanel.go
|
||||
# Final minimal image
|
||||
FROM scratch
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user