diff --git a/Dockerfile b/Dockerfile index 16d4fb2..cef4861 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,8 +2,10 @@ FROM golang:alpine AS builder ARG TARGETARCH ARG version=not-set ARG SHORTSHA=not-set +RUN apk add 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} \ @@ -14,3 +16,4 @@ FROM alpine AS runner COPY --from=builder /app/bin/crawler /usr/bin/ WORKDIR /app ENTRYPOINT /usr/bin/crawler +