added building docker container

This commit is contained in:
wt committed 2025-07-25 18:08:10 +07:00
1 parent 0f777d3e68
commit 42a57bf284
5 files changed
+71

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
FROM golang:1.24.5-alpine AS build-stage
WORKDIR /app
COPY . .
RUN apk update && \
apk upgrade && \
apk add binutils && \
go mod tidy && \
go build && \
strip scm
FROM alpine:latest AS build-release-stage
WORKDIR /data
COPY --from=build-stage /app/scm /scm
RUN mkdir -p /certs
COPY scm.conf.docker /data/scm.conf
ENTRYPOINT [ "/scm" ]