c8efa2c068
- Removed the entrypoint.sh script from the scraper Dockerfile to streamline the build process. - Updated the Dockerfile to directly set the ENTRYPOINT to the scraper build executable, simplifying the container startup. - This change enhances maintainability by reducing the number of files and improving clarity in the Docker configuration.
23 lines
463 B
Docker
23 lines
463 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 scraper-build ./cmd/scraper/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/scraper-build .
|
|
|
|
EXPOSE 80
|
|
|
|
ENTRYPOINT /app/scraper-build
|