Skip to content

Commit

Permalink
Revert "Remove glibc"
Browse files Browse the repository at this point in the history
This reverts commit a07b508.
  • Loading branch information
Kingwayer committed Jun 30, 2024
1 parent a07b508 commit 73578f5
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions alpine/5/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ARG FILENAME=invoiceninja.tar
# && apk upgrade


RUN set -eux; apk add curl unzip grep nano wget tzdata
RUN set -eux; apk add curl unzip grep nano wget tzdata ca-certificates

RUN DOWNLOAD_URL=$(curl -s "https://api.github.com/repos/invoiceninja/invoiceninja/releases/latest" | grep -o '"browser_download_url": "[^"]*invoiceninja.tar"' | cut -d '"' -f 4) && \
curl -LJO "$DOWNLOAD_URL" && \
Expand Down Expand Up @@ -66,9 +66,33 @@ RUN mkfontscale && mkfontdir && fc-cache -fv
CMD ["/bin/sh"]


# Install necessary packages for localedef setup LANG
RUN set -eux; \
apk add build-base \
binutils \
build-base \
gcc \
musl-dev \
libc-dev \
gettext


# Install Glibc for Chinese of multilingual & i18n support better
RUN curl -L -o /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub
RUN curl -s 'https://api.github.com/repos/sgerrand/alpine-pkg-glibc/releases/latest' | grep 'browser_download_url' | sed -E 's/.*"([^"]+)".*/\1/' | xargs -n 1 curl -LO

RUN apk add --force-overwrite glibc-*.apk && \
rm glibc-*.apk

RUN export PATH=/usr/glibc-compat/bin:$PATH

RUN apk --no-cache add glibc-i18n && \
/usr/glibc-compat/bin/localedef -i en_US -f UTF-8 en_US.UTF-8 && \
echo "export LANG=en_US.UTF-8" > /etc/profile.d/locale.sh

# Enable below if need choice timezone to go.
#RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
#&& echo "Asia/Shanghai" > /etc/timezone
#&& echo "Asia/Shanghai" > /etc/timezon


RUN install-php-extensions \
Expand Down

0 comments on commit 73578f5

Please sign in to comment.