Closed arokem closed 6 years ago
Good point. I like the idea of using
id -u ${username} >/dev/null 2>&1 || useradd ${username}
as in the stackexchange answer.
We may also need to pay more attention to how we set up the WORKDIR
. I'm guessing this won't be the last issue generated from your experiments using cloudknot with neurodocker.
It's actually not neurodocker, but experiments with a hand-built docker image that includes some other non-python dependencies. The use-case is described here: https://github.com/ccurtis7/diff_classifier, and the base image Dockerfile is here: https://github.com/ccurtis7/diff_classifier/pull/9, adding Fiji (a biomedical image processing application written in java...) as a dependency.
Resolved by #139
If you inherit a
DockerImage
from a hand-crafted base image, you might run into a situation where the user (e.g., the defaultcloudknot-user
) already exists by the time you get here: https://github.com/richford/cloudknot/blob/master/cloudknot/templates/Dockerfile.template#L16This will make your build of the derived image fail.
Unless, we do something like this: https://unix.stackexchange.com/a/28530