mirror of
https://github.com/darksaid98/yolks.git
synced 2026-12-04 06:29:00 +00:00
fix(yagpdb): use alpine
This commit is contained in:
2 files changed
+16
-12
No files matched your search
@@ -20,29 +20,27 @@ RUN CGO_ENABLED=0 GOOS=linux go build -v -ldflags "-X github.com/botlabs-gg/yagp
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
FROM --platform=$TARGETOS/$TARGETARCH debian:bookworm-slim
|
FROM --platform=$TARGETOS/$TARGETARCH alpine:latest
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
|
||||||
|
|
||||||
# Dependencies: ca-certificates for client TLS, tzdata for timezone and ffmpeg for soundboard support
|
# Dependencies: ca-certificates for client TLS, tzdata for timezone and ffmpeg for soundboard support
|
||||||
RUN apt update -y \
|
RUN apk update \
|
||||||
&& apt upgrade -y \
|
&& apk upgrade \
|
||||||
&& apt install -y ca-certificates tini ffmpeg tzdata
|
&& apk --no-cache add autoconf ca-certificates ffmpeg tzdata tini iproute2 iputils-ping bind-tools curl
|
||||||
|
|
||||||
ENV LANG C.UTF-8
|
ENV LANG C.UTF-8
|
||||||
ENV LC_ALL C.UTF-8
|
ENV LC_ALL C.UTF-8
|
||||||
|
|
||||||
RUN useradd -m -d /home/container -s /bin/bash container
|
RUN adduser -D -h /home/container container -s /bin/bash container
|
||||||
USER container
|
USER container
|
||||||
ENV USER=container HOME=/home/container
|
ENV USER=container HOME=/home/container
|
||||||
WORKDIR /home/container
|
WORKDIR /home/container
|
||||||
|
|
||||||
COPY --from=builder /appbuild/yagpdb/cmd/yagpdb/yagpdb /usr/bin/yagpdb
|
COPY --from=builder /appbuild/yagpdb/cmd/yagpdb/yagpdb /usr/bin/yagpdb
|
||||||
RUN chmod +x /usr/bin/yagpdb
|
# RUN chmod +x /usr/bin/yagpdb
|
||||||
|
|
||||||
STOPSIGNAL SIGINT
|
STOPSIGNAL SIGINT
|
||||||
|
|
||||||
COPY --chown=container:container ./entrypoint.sh /entrypoint.sh
|
COPY --chown=container:container ./entrypoint.sh /entrypoint.sh
|
||||||
RUN chmod +x /entrypoint.sh
|
RUN chmod +x /entrypoint.sh
|
||||||
ENTRYPOINT ["/usr/bin/tini", "-g", "--"]
|
ENTRYPOINT ["/sbin/tini", "-g", "--"]
|
||||||
CMD ["/entrypoint.sh"]
|
CMD ["/entrypoint.sh"]
|
||||||
@@ -22,14 +22,20 @@
|
|||||||
# SOFTWARE.
|
# SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Switch to the container's working directory
|
||||||
|
cd /home/container || exit 1
|
||||||
|
|
||||||
|
# Wait for the container to fully initialize
|
||||||
|
sleep 1
|
||||||
|
|
||||||
# Default the TZ environment variable to UTC.
|
# Default the TZ environment variable to UTC.
|
||||||
TZ=${TZ:-UTC}
|
TZ=${TZ:-UTC}
|
||||||
export TZ
|
export TZ
|
||||||
|
|
||||||
# Switch to the container's working directory
|
# Set environment variable that holds the Internal Docker IP
|
||||||
cd /home/container || exit 1
|
INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}')
|
||||||
|
export INTERNAL_IP
|
||||||
|
|
||||||
# Add custom binary
|
|
||||||
export PATH=$PATH:/root/.local/bin
|
export PATH=$PATH:/root/.local/bin
|
||||||
|
|
||||||
# Convert all of the "{{VARIABLE}}" parts of the command into the expected shell
|
# Convert all of the "{{VARIABLE}}" parts of the command into the expected shell
|
||||||
|
|||||||
Reference in new issue
Block a user