Skip to content

Commit

Permalink
deploy: b2e5ae5
Browse files Browse the repository at this point in the history
  • Loading branch information
JakobBerg committed Feb 5, 2025
1 parent 73857ec commit 2642924
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 1 deletion.
Binary file modified .doctrees/course_contents/HandsOn.doctree
Binary file not shown.
Binary file modified .doctrees/environment.pickle
Binary file not shown.
26 changes: 26 additions & 0 deletions _sources/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
```





12 changes: 12 additions & 0 deletions course_contents/HandsOn.html
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,18 @@ <h1>Docker Hands-on beginners training<a class="headerlink" href="#docker-hands-
<span class="n">docker</span> <span class="n">images</span>
</pre></div>
</div>
<p>While we would rather reccomend using <em>virtual environments</em> for running speciffic environments interactively, it can be handy to be familiar with dockers ability to run a container in interactive mode.</p>
<p>this is done by adding the two commandline inputs to the <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">run</span></code> command <code class="docutils literal notranslate"><span class="pre">--interactive</span></code> and <code class="docutils literal notranslate"><span class="pre">--tty</span></code> which have the equivalents <code class="docutils literal notranslate"><span class="pre">-i</span></code> and <code class="docutils literal notranslate"><span class="pre">-t</span></code>.
They can thus be run with the following syntax:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">docker</span> <span class="n">run</span> <span class="o">-</span><span class="n">it</span> <span class="o">&lt;</span><span class="n">container</span><span class="o">-</span><span class="n">name</span><span class="o">&gt;</span> <span class="o">&lt;</span><span class="n">command</span><span class="o">&gt;</span>
</pre></div>
</div>
<p>Excercise:</p>
<p>launch the BASH shell (<code class="docutils literal notranslate"><span class="pre">bash</span></code>) in the publicly available <code class="docutils literal notranslate"><span class="pre">debian:bullseye-slim</span></code> container.</p>
<p>Solution:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">docker</span> <span class="n">run</span> <span class="o">-</span><span class="n">it</span> <span class="n">debian</span><span class="p">:</span><span class="n">bullseye</span><span class="o">-</span><span class="n">slim</span> <span class="n">bash</span>
</pre></div>
</div>
</section>


Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2642924

Please sign in to comment.