...
Below are some extra tips and commands that might come in handy.
Code Block | ||||||
---|---|---|---|---|---|---|
|
...
| |||
docker exec <container name> <command arguments> |
We ran into this command when accessing jupyter in the section above. The exec command allows you to execute arbitrary commands in a running container, e.g. a python script.
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
docker exec -it <container name> <command arguments>bash |
This returns a shell that gives you terminal level access to your container. It might be highly useful when setting up things in a container that was not already fixed by the docker script, or for just getting more familiar with the environment you’ve created. Note the –it switches used; they make the session interactive, which means that stdin from your current shell will be hooked up to the shell granted by the container.
Info |
---|
Feel free to help us provide a better wiki by sharing your skills and knowledge. |
...