us-dop-scrapper/Dockerfile
maximo tejeda 98dce2d47c
Some checks failed
dev test / test (push) Successful in 1m20s
dev test / vulnCheck (push) Successful in 32s
dev test / Ci-Lint (push) Successful in 28s
${{ github.actor }} executed Build Push Prod / build (push) Failing after 37s
${{ github.actor }} executed Build Push Prod / deploy (push) Has been skipped
fix err handling
2024-12-02 20:32:29 -04:00

17 lines
461 B
Docker

FROM golang:alpine AS builder
ARG TARGETARCH
ARG version=not-set
ARG SHORTSHA=not-set
WORKDIR /app
COPY . .
# https://stackoverflow.com/questions/70369368/check-architecture-in-dockerfile-to-get-amd-arm
RUN go build -o bin/crawler \
-ldflags "-X main.Shortsha=${SHORTSHA} \
-X main.Version=${version} \
-X main.Aarch=${TARGETARCH}" ./cmd
FROM alpine AS runner
COPY --from=builder /app/bin/crawler /usr/bin/
WORKDIR /app
ENTRYPOINT /usr/bin/crawler