-
-
Notifications
You must be signed in to change notification settings - Fork 350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Instructions for Miniforge3 on alpine Linux #219
Comments
we test our installer with a few different docker images. are you able to make a PR adding to the list? you might be missing a system dependency. maybe we will need bz2 |
We don't support musl libc. You have to install the glibc compat library, if you want to run miniforge. |
@hmaarrfk Sorry I don't have time at the moment to submit a PR, working around it a different way for now FROM alpine
RUN apk update &&\
apk add --no-cache curl bash libc6-compat bzip2 &&\
ln -s /lib/libc.musl-x86_64.so.1 /lib/ld-linux-x86-64.so.2 &&\
ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2
RUN curl -fsSLo Miniforge3.sh https://github.com/conda-forge/miniforge/releases/download/4.10.3-5/Miniforge3-4.10.3-5-$(uname)-$(uname -m).sh
RUN sha256sum Miniforge3.sh
RUN echo "5f143112b6c9533c550b447cc01f7313a86b6b88b92632791bcb4320e57f9af6 Miniforge3.sh" | sha256sum -c
RUN bash Miniforge3.sh -b -p ./miniforge3
|
Ok, I've renamed the issue to reflect the current state. and flagged it as "help wanted". If you have information that can help us, it would be great to submit a PR describing how you got things working for others. |
we can use the same method used by miniconda using the glibc for alpine FROM alpine:3.15.0 as alpine-glibc
LABEL src=https://github.com/frol/docker-alpine-glibc
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
# hadolint ignore=DL3018
RUN ALPINE_GLIBC_BASE_URL="https://github.com/sgerrand/alpine-pkg-glibc/releases/download" && \
ALPINE_GLIBC_PACKAGE_VERSION="2.34-r0" && \
ALPINE_GLIBC_BASE_PACKAGE_FILENAME="glibc-$ALPINE_GLIBC_PACKAGE_VERSION.apk" && \
ALPINE_GLIBC_BIN_PACKAGE_FILENAME="glibc-bin-$ALPINE_GLIBC_PACKAGE_VERSION.apk" && \
ALPINE_GLIBC_I18N_PACKAGE_FILENAME="glibc-i18n-$ALPINE_GLIBC_PACKAGE_VERSION.apk" && \
apk add -q --no-cache --virtual=.build-dependencies wget ca-certificates && \
echo \
"-----BEGIN PUBLIC KEY-----\
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApZ2u1KJKUu/fW4A25y9m\
y70AGEa/J3Wi5ibNVGNn1gT1r0VfgeWd0pUybS4UmcHdiNzxJPgoWQhV2SSW1JYu\
tOqKZF5QSN6X937PTUpNBjUvLtTQ1ve1fp39uf/lEXPpFpOPL88LKnDBgbh7wkCp\
m2KzLVGChf83MS0ShL6G9EQIAUxLm99VpgRjwqTQ/KfzGtpke1wqws4au0Ab4qPY\
KXvMLSPLUp7cfulWvhmZSegr5AdhNw5KNizPqCJT8ZrGvgHypXyiFvvAH5YRtSsc\
Zvo9GI2e2MaZyo9/lvb+LbLEJZKEQckqRj4P26gmASrZEPStwc+yqy1ShHLA0j6m\
1QIDAQAB\
-----END PUBLIC KEY-----" | sed 's/ */\n/g' > "/etc/apk/keys/sgerrand.rsa.pub" && \
wget -q \
"$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \
"$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \
"$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" && \
apk add -q --no-cache \
"$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \
"$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \
"$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" && \
\
rm "/etc/apk/keys/sgerrand.rsa.pub" && \
/usr/glibc-compat/bin/localedef --force --inputfile POSIX --charmap UTF-8 "$LANG" || true && \
echo "export LANG=$LANG" > /etc/profile.d/locale.sh && \
\
apk del -q glibc-i18n && \
\
rm "/root/.wget-hsts" && \
apk del -q .build-dependencies && \
rm \
"$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \
"$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \
"$ALPINE_GLIBC_I18N_PACKAGE_FILENAME"
FROM alpine-glibc
ENV PATH /opt/miniforge3/bin:$PATH
RUN apk update && apk add curl bash procps
RUN curl -fsSLo Miniforge3.sh https://github.com/conda-forge/miniforge/releases/download/4.10.3-5/Miniforge3-4.10.3-5-$(uname)-$(uname -m).sh
RUN sha256sum Miniforge3.sh
RUN echo "5f143112b6c9533c550b447cc01f7313a86b6b88b92632791bcb4320e57f9af6 Miniforge3.sh" | sha256sum -c
RUN bash Miniforge3.sh -b -p /opt/miniforge3 &&\
ln -s /opt/miniforge3/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \
echo ". /opt/miniforge3/etc/profile.d/conda.sh" >> ~/.bashrc && \
echo "conda activate base" >> ~/.bashrc && \
find /opt/miniforge3/ -follow -type f -name '*.a' -delete && \
find /opt/miniforge3/ -follow -type f -name '*.js.map' -delete && \
/opt/miniforge3/bin/conda clean -afy
CMD ["/bin/bash"]
|
Additional information: On glibc 2.35, you will get errors:
So it appears we need to stick with version 2.34 |
You can use https://github.com/Docker-Hub-frolvlad/docker-alpine-glibc as the base or use the script there. It also uses 2.34 to workaround sgerrand/alpine-pkg-glibc#176 |
Issue:
Miniforge3 installer fails on alpine Linux.
I get the following error:
You can run this
Dockerfile
to replicate the problem:The text was updated successfully, but these errors were encountered: