dae8eb44e2
- Added a step in the Dockerfile to copy the documentation files from the build stage to the final image. - This change ensures that the documentation is included in the Docker image, improving accessibility for users and developers.
25 lines
547 B
Docker
25 lines
547 B
Docker
ARG GO_VERSION=1.23
|
|
ARG BASH_VERSION=5.0
|
|
|
|
FROM golang:${GO_VERSION} AS go-builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY . .
|
|
|
|
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -o web-build ./cmd/web/main.go
|
|
|
|
FROM bash:${BASH_VERSION}
|
|
RUN apk --no-cache add busybox-suid curl rsync tzdata tcpdump tree ca-certificates s-nail \
|
|
&& ln -s /usr/bin/mail /usr/bin/s-nail
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=go-builder /app/web-build .
|
|
COPY --from=go-builder /app/cmd/web/assets ./assets
|
|
COPY --from=go-builder /app/cmd/web/docs ./docs
|
|
|
|
EXPOSE 80
|
|
|
|
ENTRYPOINT /app/web-build
|