# https://github.com/google-ai-edge/mediapipe/blob/master/Dockerfile.manylinux2014_aarch64rp4 # pull manylinux2014 image for 64 bit linux ARG BASEIMG #FROM quay.io/pypa/manylinux2014_x86_64 FROM $BASEIMG # https://nono.ma/dockerfile-arguments # Passing in argument GID, groupid ARG GID ARG UID # Add new user greenstone in group greenstone with groupid passed in RUN groupadd --gid $GID greenstone RUN adduser --uid $UID --gid $GID greenstone # If we want to compile, some packages may need gcc/g++/cc in /usr/bin like subversion did # where export PATH=/opt/rh/devtoolset-10/root/usr/bin/:$PATH wasn't enough # Ask Dr Bainbridge: I think he had a better solution than this. Was it setting C(PP/XX)FLAGS? #RUN ln -s /opt/rh/devtoolset-10/root/usr/bin/gcc /usr/bin/gcc #RUN ln -s /opt/rh/devtoolset-10/root/usr/bin/g++ /usr/bin/g++ #RUN ln -s /opt/rh/devtoolset-10/root/usr/bin/cc /usr/bin/cc # Still as root RUN yum check-update RUN yum update -y # To sort out compiling issues when running create-gs3-caveat-linux64.sh # Need libc.a #RUN yum groupinstall 'Development Tools' RUN yum -y install glibc-static # Now switch to greenstone user. There's no uname-pwd # This doesn't work in Dockerfile #RUN su - greenstone # https://stackoverflow.com/questions/24549746/switching-users-inside-docker-image-to-a-non-root-user#24555761 #USER greenstone #RUN echo `whoami` #WORKDIR /home/greenstone WORKDIR /app/data RUN mkdir -p /greenstone RUN curl https://trac.greenstone.org/export/HEAD/gs2-extensions/subversion/trunk/subversion-linux.tar.gz > subversion-linux.tar.gz # extracting produces subversion folder RUN tar -xvzf subversion-linux.tar.gz # svn won't work if its libraries are not available, need to set LD_LIBRARY_PATH # https://stackoverflow.com/questions/65927918/set-ldconfig-ld-library-path-in-a-docker-container ENV LD_LIBRARY_PATH /app/data/subversion/linux/lib #RUN /home/greenstone/subversion/linux/bin/svn co https://svn.greenstone.org/main/trunk/gs-release-builder #RUN /app/data/subversion/linux/bin/svn co https://svn.greenstone.org/main/trunk/gs-release-builder RUN ./subversion/linux/bin/svn co https://svn.greenstone.org/main/trunk/gs-release-builder # Let the user end up in /home/greenstone #WORKDIR /home/greenstone WORKDIR /greenstone