-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile.aarch64
32 lines (28 loc) · 1.15 KB
/
Dockerfile.aarch64
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# syntax=docker/dockerfile:1
FROM ghcr.io/imagegenius/baseimage-alpine:arm64v8-3.19
# set version label
ARG BUILD_DATE
ARG VERSION
ARG GLIBC_VERSION
LABEL build_version="ImageGenius Version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="hydazz"
# ld-linux-x86-64.so.2 -> /usr/glibc-compat/lib/ld-linux-x86-64.so.2 (aarch64 for this image)
# https://github.com/sgerrand/alpine-pkg-glibc/pull/180
RUN \
echo "**** install packages ****" && \
if [ -z ${GLIBC_VERSION} ]; then \
GLIBC_VERSION=$(curl -sL "https://packages.imagegenius.io/v3.19/aarch64/APKINDEX.tar.gz" | tar -xz -C /tmp \
&& awk '/^P:'"glibc"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \
fi && \
apk add --no-cache --force-overwrite \
glibc==${GLIBC_VERSION} \
glibc-bin==${GLIBC_VERSION} \
glibc-i18n==${GLIBC_VERSION} && \
(/usr/glibc-compat/bin/localedef --force --inputfile POSIX --charmap UTF-8 C.UTF-8 || true) && \
echo "export LANG=C.UTF-8" >/etc/profile.d/locale.sh && \
ln -fs /usr/glibc-compat/lib/ld-linux-aarch64.so.1 /lib/ld-linux-aarch64.so.1 && \
echo "**** cleanup ****" && \
apk del \
glibc-i18n && \
rm -rf \
/tmp/*