add docker file

This commit is contained in:
maximo tejeda 2024-02-07 13:57:51 -04:00
parent e96f6df206
commit 2ac6609550

View File

@ -1,17 +1,17 @@
FROM golang:latest as builder FROM golang:1.22rc2 as builder
WORKDIR /app WORKDIR /app
COPY . /app COPY . /app
RUN ls -l
RUN go mod download && go mod tidy RUN go mod download && go mod tidy
RUN go build -o bin/crawler ./cmd/crawler/main.go RUN go build -o bin/crawler ./cmd/crawler/main.go
FROM mcr.microsoft.com/playwright FROM golang:latest
RUN go install github.com/playwright-community/playwright-go/cmd/playwright@latest
RUN playwright install --with-deps
COPY --from=builder /app/bin/crawler /usr/bin/crawler COPY --from=builder /app/bin/crawler /usr/bin/crawler
CMD ["crawler"] CMD ["crawler"]