starting the service is always better
Some checks failed
🧪 ✨ Unit Tests Workflow / 🔍 🐹 Go Tests (push) Failing after 9m3s
Some checks failed
🧪 ✨ Unit Tests Workflow / 🔍 🐹 Go Tests (push) Failing after 9m3s
This commit is contained in:
4
.dockerignore
Normal file
4
.dockerignore
Normal file
@@ -0,0 +1,4 @@
|
||||
.idea/
|
||||
Go-Template
|
||||
README.md
|
||||
.gitea/
|
26
Dockerfile
Normal file
26
Dockerfile
Normal file
@@ -0,0 +1,26 @@
|
||||
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"]
|
Reference in New Issue
Block a user