codeword/Containerfile
skeris ba92325e08
Some checks failed
Deploy / CreateImage (push) Successful in 3m22s
Deploy / DeployService (push) Successful in 29s
Sync OpenAPI Spec / sync-spec (push) Has been cancelled
chore: rename api dir\nci: fix base image in containerfile
2025-09-21 15:13:55 +03:00

28 lines
590 B
Docker

# BUILD
FROM gitea.pena/penadevops/container-images/golang:1.23.8-alpine as build
# Update packages and clear cache
RUN apk add --no-cache curl
# Set work directory
WORKDIR /app
# Create binary directory
RUN mkdir /app/bin -p
# Add main files to app
RUN apk add git
ADD . .
RUN go mod download
# Build app
RUN GOOS=linux go build -o bin ./...
# PRODUCTION
FROM gitea.pena/penadevops/container-images/alpine:main
# Install packages
RUN apk --no-cache add ca-certificates
# Create home directory
WORKDIR /app
# Copy build file
COPY --from=build /app/bin/codeword ./app
# CMD
CMD ["./app"]