singularity2docker
singularity2docker copied to clipboard
Update Dockerfile to use ENTRYPOINT instead of CMD
This update enables the direct use of executables not at default PATH inside the container.
For example, if an executable mpichversion is install at /opt/mpich/bin, and its path is correctly added to apptainer PATH, it is possible to do the following:
apptainer run image.sif mpichversion
But for the docker image converted from the current conversion script, the following will not work:
docker run image-converted mpichversion
since mpichversion is not in the default PATH. The PATH is to be set in the run script, i.e. CMD in docker file will not take effect in this case.
But with ENTRYPOINT, this can be possible since it applies to each start of the docker image.