ARG BASE_REPO=gradescope/autograder-base ARG TAG=latest FROM ${BASE_REPO}:${TAG} RUN python3 -m pip install pymongo RUN curl -fsSL https://pgp.mongodb.com/server-7.0.asc | gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg --dearmor RUN export OS_VER=`cat /etc/os-release | grep VERSION_CODENAME` && \ export OS_VER=${OS_VER#*=} && \ printf "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.org/apt/ubuntu "${OS_VER}"/mongodb-org/7.0 multiverse\n">/etc/apt/sources.list.d/mongodb.list RUN apt-get update RUN mkdir -p /data/db RUN apt install -y mongodb-org RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ADD source /autograder/source RUN cp /autograder/source/run_autograder /autograder/run_autograder RUN dos2unix /autograder/run_autograder RUN chmod +x /autograder/run_autograder