forked from assimon/captcha-bot
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
41 additions
and
3,294 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,26 @@ | ||
FROM debian:bullseye-slim | ||
RUN apt-get update -y \ | ||
&& apt-get install -y libsqlite3-dev \ | ||
&& apt-get install -y sqlite3 \ | ||
&& apt-get install -y libc6 \ | ||
&& apt-get install -y libc6-dev \ | ||
&& apt-get install -y musl | ||
RUN mkdir -p /app/db | ||
ADD config.toml /app/ | ||
ADD captcha-bot /app/ | ||
ADD cacert.pem /etc/ssl/certs/ | ||
FROM golang:latest as builder | ||
|
||
WORKDIR /app | ||
ENTRYPOINT ["./captcha-bot"] | ||
|
||
COPY . . | ||
|
||
RUN apt-get update && apt-get install -y musl-tools | ||
|
||
ENV CGO_ENABLED=1 \ | ||
GOOS=linux \ | ||
GOARCH=amd64 \ | ||
CC=x86_64-linux-musl-gcc \ | ||
CXX=x86_64-linux-musl-g++ \ | ||
GOPROXY=https://goproxy.cn,direct | ||
|
||
RUN go mod download | ||
RUN go mod verify | ||
RUN go build -ldflags '-linkmode external -extldflags "-static"' -o captcha-bot | ||
|
||
FROM alpine:latest | ||
|
||
COPY --from=builder /app/captcha-bot /work/captcha-bot | ||
|
||
WORKDIR /work | ||
|
||
ENTRYPOINT ["./captcha-bot"] |
Oops, something went wrong.