Created
January 25, 2022 10:57
-
-
Save kaimi-/1a755b24ffcc6972183d52f809a63979 to your computer and use it in GitHub Desktop.
A-Bot under Alpine Linux environment with glibc in Docker
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
# A-Bot under Alpine Linux environment with glibc in Docker | |
# | |
# docker build --tag abot-alpine:1.0 . | |
# docker run -it --rm -v ${PWD}:/opt/abot-data --name abot-alpine abot-alpine:1.0 | |
# | |
# Referal (BEP20): 0x6c13cc78c20f8123db1b52bc1fc90174edb55a55 | |
# | |
FROM alpine:3.14 | |
ENV LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LANGUAGE=en_US.UTF-8 | |
ENV GLIBC_REPO=https://github.com/sgerrand/alpine-pkg-glibc | |
ENV GLIBC_VERSION=2.34-r0 | |
# Setup glibc (https://github.com/sgerrand/alpine-pkg-glibc) for A-Bot static builds | |
RUN apk --update add ca-certificates curl libstdc++ | |
RUN curl -sSL ${GLIBC_REPO}/releases/download/${GLIBC_VERSION}/glibc-${GLIBC_VERSION}.apk -o /tmp/glibc-${GLIBC_VERSION}.apk | |
RUN curl -sSL ${GLIBC_REPO}/releases/download/${GLIBC_VERSION}/glibc-bin-${GLIBC_VERSION}.apk -o /tmp/glibc-bin-${GLIBC_VERSION}.apk | |
RUN curl -sSL ${GLIBC_REPO}/releases/download/${GLIBC_VERSION}/glibc-i18n-${GLIBC_VERSION}.apk -o /tmp/glibc-i18n-${GLIBC_VERSION}.apk | |
RUN apk add --allow-untrusted /tmp/*.apk | |
RUN rm -v /tmp/*.apk | |
RUN /usr/glibc-compat/sbin/ldconfig /lib /usr/glibc-compat/lib | |
RUN /usr/glibc-compat/bin/localedef -i en_US -f UTF-8 en_US.UTF-8 | |
RUN sed -i 's#/usr/bin/bash#/bin/sh#' /usr/glibc-compat/bin/ldd | |
# Download A-Bot (https://github.com/dpcwee/abot) | |
RUN mkdir /opt/abot-data | |
RUN curl -sSL https://github.com/dpcwee/abot/releases/latest/download/A-Bot --output /opt/A-Bot | |
RUN chmod +x /opt/A-Bot | |
WORKDIR "/opt/abot-data" | |
ENTRYPOINT [ "/opt/A-Bot" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment