plakken/deployment/docker/Dockerfile
Akinimaginable cad728f982
Some checks failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/release Pipeline was successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/pr/release Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/lint Pipeline failed
ci/woodpecker/pull_request_closed/release Pipeline was successful
ci/woodpecker/pull_request_closed/lint Pipeline was successful
ci/woodpecker/pull_request_closed/build Pipeline was successful
Made deployement more modular and updated Dockerfile
2024-05-11 01:05:09 +02:00

28 lines
No EOL
514 B
Docker

# Build
FROM golang:1.22 AS build
WORKDIR /build
COPY go.mod go.sum ./
RUN go mod download
COPY static/ ./static
COPY templates/ ./templates
COPY main.go ./
COPY internal/ ./internal
# Enable static binary, target Linux, remove debug information and strip binary
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags "-w -s"
# Copy to our image
FROM gcr.io/distroless/static-debian12:nonroot
WORKDIR /app
COPY --from=build /build/plakken ./
ENV PLAKKEN_LISTEN ":3000"
EXPOSE 3000/tcp
ENTRYPOINT ["/app/plakken"]