Move the ARG for INSTALL_PATH from before the FROM to after. Previously, broadway was being installed in / rather than /opt/broadway as the Dockerfile intended to. This is what the current BW graders look like:
ericsz2@fa20-cs241-grd-13:~$ sudo docker exec -it 6925e00437c0 /bin/sh
/ # ls
bin home mnt root sys
broadway lib opt run tmp
dev log proc sbin usr
etc media requirements.txt srv var
Set the WORKDIR to /srv/cs241/broadway-grader. This way, we can add -v /srv/cs241/broadway-grader:/srv/cs241/broadway-grader as an argument when starting the container which will properly clean up the tmp******** directories in the grader machines.
I've tested these changes on grader 13 a while back. I built a local image using the updated Dockerfile and spun up a BW grader using that, then scheduled a run on grader 13, then verified that the tmp******** directory that was created for the grading pipeline was also cleaned up properly.
Few changes:
Move the
ARG
forINSTALL_PATH
from before theFROM
to after. Previously, broadway was being installed in/
rather than/opt/broadway
as the Dockerfile intended to. This is what the current BW graders look like:"An ARG declared before a FROM is outside of a build stage, so it can’t be used in any instruction after a FROM." from https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact.
Set the
WORKDIR
to/srv/cs241/broadway-grader
. This way, we can add-v /srv/cs241/broadway-grader:/srv/cs241/broadway-grader
as an argument when starting the container which will properly clean up thetmp********
directories in the grader machines.I've tested these changes on grader 13 a while back. I built a local image using the updated Dockerfile and spun up a BW grader using that, then scheduled a run on grader 13, then verified that the
tmp********
directory that was created for the grading pipeline was also cleaned up properly.