Files
Go-Template/Dockerfile
Ron Rise 296f2eed84
Some checks failed
🧪 ✨ Unit Tests Workflow / 🔍 🐹 Go Tests (push) Failing after 9m3s
starting the service is always better
2025-05-22 17:09:19 -04:00

26 lines
420 B
Docker

FROM siteworxpro/golang:1.24.3 AS build
WORKDIR /app
ADD . .
ENV GOPRIVATE=git.siteworxpro.com
ENV GOPROXY=direct
ENV CGO_ENABLED=0
RUN go mod tidy && go build -o server .
FROM siteworxpro/alpine:3.21.3 AS runtime
EXPOSE 8080
WORKDIR /app
COPY --from=build /app/server /app/server
RUN adduser -u 1001 -g appuser appuser -D && \
chown -R appuser:appuser /app
USER 1001
ENTRYPOINT ["/app/server", "server"]