I'm creating a docker image with, inside, a conda environment myEnv
using a Dockerfile.
I would like, when running the docker image with
docker run -it myDockerImage
to get to a bash terminal with the environment already activated. I know we can pass variables and commands to docker run
but I would like it to be done automatically.
I tried adding the following variants to the end of the Dockerfile but nothing seems to work:
CMD ["source /root/miniconda/bin/activate myEnv"]
CMD [".", "/root/miniconda/bin/activate", "myEnv"]
CMD ["source /root/miniconda/bin/activate myEnv; /bin/bash"]