Skip to content

Commit

Permalink
Update HandsOn.md until interactive docker container
Browse files Browse the repository at this point in the history
  • Loading branch information
JakobBerg authored Feb 5, 2025
1 parent 1a0db56 commit b2e5ae5
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions course_contents/HandsOn.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,29 @@ Solution:
docker pull debian:bullseye-slim
docker images
```



While we would rather reccomend using _virtual environments_ for running speciffic environments interactively, it can be handy to be familiar with dockers ability to run a container in interactive mode.

this is done by adding the two commandline inputs to the `docker run` command `--interactive` and `--tty` which have the equivalents `-i` and `-t`.
They can thus be run with the following syntax:

```
docker run -it <container-name> <command>
```

Excercise:

launch the BASH shell (`bash`) in the publicly available `debian:bullseye-slim` container.

Solution:

```
docker run -it debian:bullseye-slim bash
```





0 comments on commit b2e5ae5

Please sign in to comment.