You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
autograders/mongodb/Dockerfile

24 lines
868 B

1 year ago
ARG BASE_REPO=gradescope/autograder-base
ARG TAG=latest
FROM ${BASE_REPO}:${TAG}
7 months ago
RUN python3 -m pip install pymongo
1 year ago
7 months ago
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
1 year ago
7 months ago
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/*
1 year ago
7 months ago
ADD source /autograder/source
1 year ago
7 months ago
RUN cp /autograder/source/run_autograder /autograder/run_autograder
1 year ago
7 months ago
RUN dos2unix /autograder/run_autograder
RUN chmod +x /autograder/run_autograder