Files
tm_back/cmd/web/Dockerfile
T
n.nakhostin 44d0f57082 Update Dockerfile to Correct Asset Copy Path
- Modified the Dockerfile to change the COPY command for web assets, ensuring the correct path is used to include assets from the cmd/web directory. This adjustment improves the organization and accessibility of web-related assets within the application.
2025-09-09 16:03:13 +03:30

24 lines
499 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
EXPOSE 80
ENTRYPOINT /app/web-build