web/backend/secretapi/Dockerfile
Joshua c96ec23bec
Some checks are pending
check / secretapi (push) Waiting to run
fix: install build-base for cgo secretapi image
2026-02-19 11:42:19 -08:00

17 lines
362 B
Docker

FROM golang:1.26-alpine AS build
WORKDIR /src
RUN apk add --no-cache build-base
COPY . .
RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -o /out/secretapi .
FROM alpine:3.20
RUN addgroup -S edut && adduser -S -G edut edut
WORKDIR /app
COPY --from=build /out/secretapi /usr/local/bin/secretapi
USER edut
EXPOSE 8080
ENTRYPOINT ["/usr/local/bin/secretapi"]