FIX Docker file
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

This commit is contained in:
maximo tejeda 2024-12-03 09:13:32 -04:00
parent baa2d658af
commit eb7dcbcc02

View File

@ -1,8 +1,8 @@
FROM golang:alpine AS builder FROM golang:latest AS builder
ARG TARGETARCH ARG TARGETARCH
ARG version=not-set ARG version=not-set
ARG SHORTSHA=not-set ARG SHORTSHA=not-set
RUN apk add git RUN apt update && apt install git
WORKDIR /app WORKDIR /app
COPY . . COPY . .
RUN go mod tidy RUN go mod tidy
@ -12,7 +12,8 @@ RUN go build -o bin/crawler \
-X main.Version=${version} \ -X main.Version=${version} \
-X main.Aarch=${TARGETARCH}" ./cmd/crawler/main.go -X main.Aarch=${TARGETARCH}" ./cmd/crawler/main.go
FROM alpine AS runner FROM mcr.microsoft.com/playwright
#FROM alpine AS runner
COPY --from=builder /app/bin/crawler /usr/bin/ COPY --from=builder /app/bin/crawler /usr/bin/
WORKDIR /app WORKDIR /app
ENTRYPOINT /usr/bin/crawler ENTRYPOINT /usr/bin/crawler