us-dop-scrapper/Dockerfile
maximo tejeda eb7dcbcc02
All checks were successful
${{ github.actor }} executed Build Push Prod / build (push) Successful in 5m50s
${{ github.actor }} executed Build Push Prod / deploy (push) Successful in 18s
FIX Docker file
2024-12-03 09:13:32 -04:00

21 lines
565 B
Docker

FROM golang:latest AS builder
ARG TARGETARCH
ARG version=not-set
ARG SHORTSHA=not-set
RUN apt update && apt install git
WORKDIR /app
COPY . .
RUN go mod tidy
# 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/main.go
FROM mcr.microsoft.com/playwright
#FROM alpine AS runner
COPY --from=builder /app/bin/crawler /usr/bin/
WORKDIR /app
ENTRYPOINT /usr/bin/crawler