Skip to content

Add entrypoint scripts to change into workdir after container has fully started

Tom Williams requested to merge runner-image-entrypoint-scripts into master

An error occurs if one tries to use the standard --workdir flag to set the working directory to a mounted EOS directory ...

  • podman (on CS8 VM):
podman --root /tmp/${USER}/containers run --rm --userns keep-id -v /tmp/krb5cc_${UID}:/tmp/krb5cc_${UID}:ro -v /eos:/eos -v /afs:/afs --workdir /eos/user/t/tsw/cms-phase2 -it docker.io/cern/cs8-base:20220401-1 ls -al /eos/user/t/tsw /afs/cern.ch/user/t/tsw/cms-phase2
Error: workdir "/eos/user/t/tsw/cms-phase2" does not exist on container 7f39ed39cbfed72105aa335d6cb5e2387f9849efb52a270efdd992af4dff28f2

Workaround: Add an entrypoint script that changes the working directory to $WORKDIR if that environment variable is defined.

Merge request reports