mirror of
https://github.com/darksaid98/yolks.git
synced 2026-12-04 06:29:00 +00:00
feat(bot): add yagpdb
This commit is contained in:
3 files changed
+93
No files matched your search
@@ -0,0 +1,43 @@
|
||||
FROM --platform=$TARGETOS/$TARGETARCH docker.io/golang:1.23.3 AS builder
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
|
||||
WORKDIR /appbuild/yagpdb
|
||||
|
||||
RUN apt update -y \
|
||||
&& apt upgrade -y \
|
||||
&& apt install -y apt-transport-https wget curl git tar
|
||||
|
||||
RUN git clone https://github.com/botlabs-gg/yagpdb.git .
|
||||
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
WORKDIR /appbuild/yagpdb/cmd/yagpdb
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -v -ldflags "-X github.com/botlabs-gg/yagpdb/v2/common.VERSION=$(git describe --tags)"
|
||||
|
||||
|
||||
|
||||
FROM --platform=$TARGETOS/$TARGETARCH docker.io/alpine:latest
|
||||
|
||||
# Dependencies: ca-certificates for client TLS, tzdata for timezone and ffmpeg for soundboard support
|
||||
RUN apk --no-cache add ca-certificates tini ffmpeg tzdata
|
||||
|
||||
ENV LANG C.UTF-8
|
||||
ENV LC_ALL C.UTF-8
|
||||
|
||||
RUN useradd -m -d /home/container -s /bin/bash container
|
||||
USER container
|
||||
ENV USER=container HOME=/home/container
|
||||
WORKDIR /home/container
|
||||
|
||||
COPY --from=builder /appbuild/yagpdb/cmd/yagpdb/yagpdb yagpdb
|
||||
|
||||
STOPSIGNAL SIGINT
|
||||
|
||||
COPY --chown=container:container ./entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
ENTRYPOINT ["/usr/bin/tini", "-g", "--"]
|
||||
CMD ["/entrypoint.sh"]
|
||||
Reference in new issue
Block a user