us-dop-scrapper/Dockerfile
maximo tejeda b306e432f7
Some checks failed
${{ github.actor }} executed Build Push Prod / build (push) Failing after 50s
${{ github.actor }} executed Build Push Prod / deploy (push) Has been skipped
ADD correct main path
2024-12-02 20:45:00 -04:00

17 lines
470 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/crawler/
FROM alpine AS runner
COPY --from=builder /app/bin/crawler /usr/bin/
WORKDIR /app
ENTRYPOINT /usr/bin/crawler