add git
This commit is contained in:
parent
06ca6d804c
commit
ad366d1af5
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user