You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
368 B
Docker
18 lines
368 B
Docker
2 years ago
|
FROM golang:1.19.5-buster as builder
|
||
|
|
||
|
WORKDIR /app
|
||
|
|
||
|
COPY . .
|
||
|
RUN CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go mod init tgbod/m
|
||
|
RUN CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go get
|
||
|
RUN CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o tgbot -ldflags="-w -s" .
|
||
|
|
||
|
FROM golang:1.19.5-buster
|
||
|
|
||
|
WORKDIR /app
|
||
|
COPY --from=builder /app/tgbot /usr/bin/
|
||
|
|
||
|
ENTRYPOINT ["tgbot"]
|
||
|
|
||
|
USER 1001
|