Refactor Dockerfile and Remove iat.yaml Configuration

- Updated the Dockerfile to change the working directory to /app and streamline the build process for the web application.
- Removed the iat.yaml configuration file, simplifying the configuration management and reducing complexity in the container setup.
- Adjusted the entry point and exposed port to align with standard practices, ensuring the application runs on port 80.
This commit is contained in:
n.nakhostin
2025-08-31 16:48:08 +03:30
parent e5e9ebee32
commit 31cf9a4454
2 changed files with 7 additions and 58 deletions
+7 -8
View File
@@ -3,21 +3,20 @@ ARG BASH_VERSION=5.0
FROM golang:${GO_VERSION} AS go-builder
WORKDIR /go/src/company/tm_back
WORKDIR /app
COPY . .
COPY cmd/web/iat.yaml /go/bin/config.yaml
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 \
&& mkdir -p /go/bin/media /go/bin/log /go/bin/config
WORKDIR /go/bin
&& ln -s /usr/bin/mail /usr/bin/s-nail
COPY --from=go-builder /go/src/company/tm_back/web-build .
WORKDIR /app
EXPOSE 8090
COPY --from=go-builder /app/web-build .
ENTRYPOINT /go/bin/web-build
EXPOSE 80
ENTRYPOINT /app/web-build