mirror of
https://github.com/sequentialread/pow-captcha.git
synced 2025-03-30 15:08:29 +00:00
22 lines
540 B
Docker
22 lines
540 B
Docker
|
|
FROM golang:1.16-alpine as build
|
|
ARG GOARCH=
|
|
ARG GO_BUILD_ARGS=
|
|
|
|
RUN mkdir /build
|
|
WORKDIR /build
|
|
RUN apk add --update --no-cache ca-certificates git
|
|
COPY go.mod go.mod
|
|
COPY go.sum go.sum
|
|
COPY main.go main.go
|
|
RUN go get && go build -v $GO_BUILD_ARGS -o /build/pow-bot-deterrent .
|
|
|
|
FROM alpine
|
|
WORKDIR /app
|
|
COPY --from=build /build/pow-bot-deterrent /app/pow-bot-deterrent
|
|
COPY static /app/static
|
|
COPY PoW_Bot_Deterrent_API_Tokens /app/PoW_Bot_Deterrent_API_Tokens
|
|
RUN chmod +x /app/pow-bot-deterrent
|
|
ENTRYPOINT ["/app/pow-bot-deterrent"]
|
|
|