us-dop-scrapper/Dockerfile
maximo tejeda d3f56d52f5
All checks were successful
${{ github.actor }} executed Build Push Prod / build (push) Successful in 12m51s
${{ github.actor }} executed Build Push Prod / deploy (push) Successful in 19s
fix
2024-12-03 11:21:20 -04:00

17 lines
546 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
RUN go run github.com/playwright-community/playwright-go/cmd/playwright@latest install --with-deps
# 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
ENTRYPOINT /app/bin/crawler