singularity2docker icon indicating copy to clipboard operation
singularity2docker copied to clipboard

Update Dockerfile to use ENTRYPOINT instead of CMD

Open zhao-shihan opened this issue 3 months ago • 0 comments

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.

zhao-shihan avatar Oct 15 '25 09:10 zhao-shihan