16 lines
368 B
Docker
16 lines
368 B
Docker
FROM golang:1.22-alpine as build
|
|
|
|
WORKDIR /app
|
|
COPY . .
|
|
|
|
ENV GOCACHE=/root/.cache/go-build
|
|
RUN --mount=type=cache,target="/root/.cache/go-build" go build .
|
|
RUN --mount=type=cache,target="/root/.cache/go-build" go build -C cert .
|
|
|
|
FROM nginx:alpine-slim
|
|
|
|
COPY --from=build app app
|
|
WORKDIR /app
|
|
COPY nginx.conf /etc/nginx/nginx.conf
|
|
|
|
ENTRYPOINT [ "sh", "entrypoint.sh" ] |