mstar-webserver/Dockerfile

29 lines
462 B
Text
Raw Permalink Normal View History

2024-01-12 09:59:19 +00:00
# syntax=docker/dockerfile:1
2024-12-30 14:20:25 +00:00
FROM golang:1.23 AS build-stage
2024-01-12 09:59:19 +00:00
WORKDIR /app
COPY go.mod ./
2024-01-23 13:58:37 +00:00
COPY go.sum ./
2024-01-12 09:59:19 +00:00
RUN go mod download
COPY *.go ./
COPY ./templates/ ./templates/
COPY ./well-known/ ./well-known/
COPY ./static/ ./static/
COPY humans.txt ./
COPY robots.txt ./
RUN CGO_ENABLED=0 GOOS=linux go build -o /mstar
2024-12-30 14:20:25 +00:00
FROM scratch AS build-release-stage
2024-01-12 09:59:19 +00:00
WORKDIR /
COPY --from=build-stage /mstar /mstar
EXPOSE 8080
USER nonroot:nonroot
2024-12-30 14:20:25 +00:00
ENTRYPOINT [ "/mstar" ]