Files
tm_back/cmd/worker/Dockerfile
T
n.nakhostin 10a9081c68 Add Worker Build Step and Dockerfile for Background Processing
- Introduced a new build step in the Drone CI configuration for the worker service, enabling automated Docker image creation.
- Added a Dockerfile for the worker service, defining the build process and dependencies, ensuring a streamlined deployment for background tasks.
- Enhanced the overall CI/CD pipeline to support the new worker service, improving the project's build and deployment capabilities.
2025-10-18 09:07:46 +03:30

24 lines
514 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 worker-build ./cmd/worker/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/worker-build .
COPY --from=go-builder /app/cmd/worker/assets ./assets
EXPOSE 80
ENTRYPOINT /app/worker-build