Elffuss BraidHub

kikocis/lancedb public

main · 1.1 KiBRawPermalink
1# Many linux dockerfile with Rust, Node, and Lance dependencies installed.
2# This container allows building the node modules native libraries in an
3# environment with a very old glibc, so that we are compatible with a wide
4# range of linux distributions.
5ARG ARCH=x86_64
6
7FROM quay.io/pypa/manylinux_2_28_${ARCH}
8
9ARG ARCH=x86_64
10ARG DOCKER_USER=default_user
11
12# Install static openssl
13COPY install_openssl.sh install_openssl.sh
14RUN ./install_openssl.sh ${ARCH} > /dev/null
15
16# Protobuf is also installed as root.
17COPY install_protobuf.sh install_protobuf.sh
18RUN ./install_protobuf.sh ${ARCH}
19
20ENV DOCKER_USER=${DOCKER_USER}
21# Create a group and user, but only if it doesn't exist
22RUN echo ${ARCH} && id -u ${DOCKER_USER} >/dev/null 2>&1 || adduser --user-group --create-home --uid ${DOCKER_USER} build_user
23
24# We switch to the user to install Rust and Node, since those like to be
25# installed at the user level.
26USER ${DOCKER_USER}
27
28COPY prepare_manylinux_node.sh prepare_manylinux_node.sh
29RUN cp /prepare_manylinux_node.sh $HOME/ && \
30 cd $HOME && \
31 ./prepare_manylinux_node.sh ${ARCH}