install packages in image with Dockerfile? #404

Open
opened 2025-12-29 00:26:29 +01:00 by adam · 0 comments
Owner

Originally created by @loipf on GitHub (Oct 5, 2022).

hi,

similar to https://github.com/sickcodes/Docker-OSX/issues/342,

is it possible to edit the Dockerfile docker-osx:auto to install a few more packages and share this Dockerfile then?

in detail, I would like to add Anaconda, so its already delivered pre-installed when setting up the container with the Dockerfile:

currently I do this:

### go in interactive mode
docker run -it \
    --device /dev/kvm \
    -p 50922:10022 \
    sickcodes/docker-osx:auto

### run commands in docker 
chmod -R 777 /Users/user
curl -LO "http://repo.continuum.io/miniconda/Miniconda3-4.4.10-MacOSX-x86_64.sh"
bash Miniconda3-4.4.10-MacOSX-x86_64.sh -p ~/miniconda -b
PATH=~/miniconda/bin:${PATH}
conda install [packages]

is it possible to fix these commands in the Dockerfile itself, so they are already installed when building the container?
(I don't have to care about security issues etc.)


I would like to avoid manual package installation in the image and then save the container, as described here:
https://github.com/sickcodes/Docker-OSX#start-the-same-container-later-persistent-disk

Hope you can help me, thanks in advance

Originally created by @loipf on GitHub (Oct 5, 2022). hi, similar to https://github.com/sickcodes/Docker-OSX/issues/342, is it possible to edit the Dockerfile `docker-osx:auto` to install a few more packages and share this Dockerfile then? in detail, I would like to add Anaconda, so its already delivered pre-installed when setting up the container with the Dockerfile: currently I do this: ``` ### go in interactive mode docker run -it \ --device /dev/kvm \ -p 50922:10022 \ sickcodes/docker-osx:auto ### run commands in docker chmod -R 777 /Users/user curl -LO "http://repo.continuum.io/miniconda/Miniconda3-4.4.10-MacOSX-x86_64.sh" bash Miniconda3-4.4.10-MacOSX-x86_64.sh -p ~/miniconda -b PATH=~/miniconda/bin:${PATH} conda install [packages] ``` is it possible to fix these commands in the Dockerfile itself, so they are already installed when building the container? (I don't have to care about security issues etc.) --- I would like to avoid manual package installation in the image and then save the container, as described here: https://github.com/sickcodes/Docker-OSX#start-the-same-container-later-persistent-disk Hope you can help me, thanks in advance
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Docker-OSX#404