Skip to content

Commit 580fb3a

Browse files
committed
docker: tutorial cluster interactions
1 parent 32e0fef commit 580fb3a

4 files changed

Lines changed: 39 additions & 26 deletions

File tree

content/tutorials/development_containers/index.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,13 @@ output:
2929
You might have heard about "containerization" with [**Docker**](https://docs.docker.com).
3030
Docker has been labeled "the *Holy Grail* of reproducibility" in [The Open Science Manual by Claudio Zandonella Callegher and Davide Massidda (2023)](https://arca-dpss.github.io/manual-open-science/docker-chapter.html).
3131
Although containerization is an immensely useful Open Science tool worth striving for, the *Holy Grail* is an inaccurate metaphor, because
32-
(i) Unlike The Grail, Docker is easy to find and accessible.
33-
(ii) Docker alone does not make a reproducible workflow; some of its capability is occasionally confused with package version management.
34-
(iii) Docker has issues, some of them mitigated by configuration adjustment or switching to "Podman".
32+
33+
- (i) Unlike The Grail, Docker is easy to find and accessible.
34+
- (ii) Docker alone does not make a reproducible workflow; some of its capability is occasionally confused with package version management.
35+
- (iii) Docker has issues, some of them mitigated by configuration adjustment or switching to "Podman".
36+
37+
Time to explore what containers really are, and what they are not.
38+
3539

3640
# Overview
3741

@@ -47,15 +51,15 @@ or store and publish a whole image right away.
4751
In this notebook, you will find **installation instructions**, <a href="#sec-commands" class="quarto-xref"><b>useful commands</b></a>, references, and a loose assembly of general and almost philosophical topics to prime you on the **complications and misconceptions** surrounding containerization.
4852

4953
There are numerous useful build instructions and container images already out there, which you can **simply `pull` and `run`**.
50-
This is an easy, entry level application of container software like Docker, [covered in an introductory tutorial](../../../tutorials/TODO).
54+
This is an easy, entry level application of container software like Docker, [covered in an introductory tutorial](../../tutorials/development_containers_run).
5155

52-
A second step is to set up and deploy a **self-`build` custom container** I demonstrate step-by-step [in a slightly more advanced tutorial](../../../tutorials/TODO).
56+
A second step is to set up and deploy a **self-`build` custom container** I demonstrate step-by-step [in a slightly more advanced tutorial](../../tutorials/development_containers_build).
5357
This is intended to be a rather general test case, enabling you to later configure more specific container solutions for your own purpose.
5458
For example, you will learn how to spin up an existing `rocker/rstudio` container, and even modify it with additional system components and libraries.
5559

5660
For relevant INBO-specific use cases, make sure to [check out the `containbo` repository](https://github.com/inbo/containbo) which documents **even more tipps and tricks** assembled during my humble (but mostly succesful) attempts to get INBO R packages to run in a container environment.
5761

58-
I also present **Podman** as a [full replacement for Docker](../../../tutorials/TODO), and recommend to give it a try.
62+
I also present **Podman** as a [full replacement for Docker](../../tutorials/development_containers_podman), and recommend to give it a try.
5963

6064
On Windows, installation, configuration, and management of containers runs via the `docker desktop` app.
6165
However, this series of tutorials also covers (and in fact focuses on) the terminal-centered steps to be executed on a Linux computer or within a WSL.
@@ -173,7 +177,7 @@ docker --version
173177

174178
Congratulations: now the fun starts!
175179

176-
With docker installed, the next step is to run a container image which someone else has prepared and hosted online, [which you can read about in the next tutorial](../../../tutorials/TODO).
180+
With docker installed, the next step is to run a container image which someone else has prepared and hosted online, [which you can read about in the next tutorial](../../tutorials/development_containers_run).
177181

178182
# The Holy Grail?
179183

@@ -253,7 +257,7 @@ Historically, Docker could not run "rootless", i.e. without elevated privileges
253257
[This seems to have changed](https://docs.docker.com/engine/security/rootless), according to Docker.
254258
Some caution is still warranted: the setup procedure requires downloading and running shell scripts (which must be checked); the deamon still builds on `systemd` (*usually* root level); some functionality is limited.
255259

256-
On the other hand, there is Podman (cf. the [Podman tutorial](../../../tutorials/TODO)).
260+
On the other hand, there is Podman (cf. the [Podman tutorial](../../tutorials/development_containers_podman)).
257261
It *used to* require almost the same extra steps as the `docker-rootless` to work rootless, but we found that these requirements are now met per default.
258262
It seems that, at the time of writing, Docker and Podman have identical capabilities in terms of rootless containerization.
259263
The remaining difference is that Podman seems to have more sensible default settings.

content/tutorials/development_containers/index.qmd

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Containers with Docker and Podman"
2+
title: "Containers: An Overview"
33
description: "Introduction to containerization and the practical use of Docker-like tools."
44
date: "2025-02-21"
55
authors: [falkmielke]
@@ -28,10 +28,12 @@ output:
2828
You might have heard about "containerization" with [**Docker**](https://docs.docker.com).
2929
Docker has been labeled "the *Holy Grail* of reproducibility" in [The Open Science Manual by Claudio Zandonella Callegher and Davide Massidda (2023)](https://arca-dpss.github.io/manual-open-science/docker-chapter.html).
3030
Although containerization is an immensely useful Open Science tool worth striving for, the *Holy Grail* is an inaccurate metaphor, because
31-
(i) Unlike The Grail, Docker is easy to find and accessible.
32-
(ii) Docker alone does not make a reproducible workflow; some of its capability is occasionally confused with package version management.
33-
(iii) Docker has issues, some of them mitigated by configuration adjustment or switching to "Podman".
3431

32+
- (i) Unlike The Grail, Docker is easy to find and accessible.
33+
- (ii) Docker alone does not make a reproducible workflow; some of its capability is occasionally confused with package version management.
34+
- (iii) Docker has issues, some of them mitigated by configuration adjustment or switching to "Podman".
35+
36+
Time to explore what containers really are, and what they are not.
3537

3638
# Overview
3739

@@ -49,18 +51,18 @@ In this notebook, you will find **installation instructions**, [**useful command
4951

5052

5153
There are numerous useful build instructions and container images already out there, which you can **simply `pull` and `run`**.
52-
This is an easy, entry level application of container software like Docker, [covered in an introductory tutorial](/tutorials/TODO).
54+
This is an easy, entry level application of container software like Docker, [covered in an introductory tutorial](../../tutorials/development_containers_run).
5355

5456

55-
A second step is to set up and deploy a **self-`build` custom container** I demonstrate step-by-step [in a slightly more advanced tutorial](/tutorials/TODO).
57+
A second step is to set up and deploy a **self-`build` custom container** I demonstrate step-by-step [in a slightly more advanced tutorial](../../tutorials/development_containers_build).
5658
This is intended to be a rather general test case, enabling you to later configure more specific container solutions for your own purpose.
5759
For example, you will learn how to spin up an existing `rocker/rstudio` container, and even modify it with additional system components and libraries.
5860

5961

6062
For relevant INBO-specific use cases, make sure to [check out the `containbo` repository](https://github.com/inbo/containbo) which documents **even more tipps and tricks** assembled during my humble (but mostly succesful) attempts to get INBO R packages to run in a container environment.
6163

6264

63-
I also present **Podman** as a [full replacement for Docker](/tutorials/TODO), and recommend to give it a try.
65+
I also present **Podman** as a [full replacement for Docker](../../tutorials/development_containers_podman), and recommend to give it a try.
6466

6567

6668
On Windows, installation, configuration, and management of containers runs via the `docker desktop` app.
@@ -192,7 +194,7 @@ docker --version
192194
Congratulations: now the fun starts!
193195

194196

195-
With docker installed, the next step is to run a container image which someone else has prepared and hosted online, [which you can read about in the next tutorial](/tutorials/TODO).
197+
With docker installed, the next step is to run a container image which someone else has prepared and hosted online, [which you can read about in the next tutorial](../../tutorials/development_containers_run).
196198

197199

198200
# The Holy Grail?
@@ -282,7 +284,7 @@ Historically, Docker could not run "rootless", i.e. without elevated privileges.
282284
Some caution is still warranted: the setup procedure requires downloading and running shell scripts (which must be checked); the deamon still builds on `systemd` (*usually* root level); some functionality is limited.
283285

284286

285-
On the other hand, there is Podman (cf. the [Podman tutorial](/tutorials/TODO)).
287+
On the other hand, there is Podman (cf. the [Podman tutorial](../../tutorials/development_containers_podman)).
286288
It *used to* require almost the same extra steps as the `docker-rootless` to work rootless, but we found that these requirements are now met per default.
287289
It seems that, at the time of writing, Docker and Podman have identical capabilities in terms of rootless containerization.
288290
The remaining difference is that Podman seems to have more sensible default settings.

content/tutorials/development_containers_build/index.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,20 @@ output:
2525
---
2626

2727

28-
By now, you [will have successfully installed](../tutorials/development_containers) Docker or [Podman](../tutorials/development_containers_podman).
29-
You hopefully succeeded in [running others' containers](../tutorials/development_containers_run), e.g. from a container repository.
28+
By now, you [will have successfully installed](../../tutorials/development_containers) Docker or [Podman](../../tutorials/development_containers_podman).
29+
You hopefully succeeded in [running others' containers](../../tutorials/development_containers_run), e.g. from a container repository.
3030

3131
Next, it is time to customize your container.
3232

3333
To give you a metaphor to work on: imagine you have a nice little DIY project for your garage workshop.
3434
This time, you would like to build your own [Matryoshka dolls](https://en.wikipedia.org/wiki/Matryoshka_doll) (матрёшка, stacking dolls, a great allegory for recursion).
3535

36-
https://images.unsplash.com/photo-1586010135736-c16373adf060?q=80
37-
(Photo by <a href="https://unsplash.com/@ilmatar?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash">Iza Gawrych</a> on <a href="https://unsplash.com/photos/a-group-of-blue-and-gold-vases-sitting-on-top-of-a-table-oL3O2PybLoo?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash">Unsplash</a>)
36+
<figure>
37+
<img src="https://images.unsplash.com/photo-1586010135736-c16373adf060?q=80" alt="build" />
38+
<figcaption aria-hidden="true">(Photo by <a href="https://unsplash.com/@ilmatar?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash">Iza Gawrych</a> on <a href="https://unsplash.com/photos/a-group-of-blue-and-gold-vases-sitting-on-top-of-a-table-oL3O2PybLoo?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash">Unsplash</a>)</figcaption>
39+
</figure>
40+
41+
3842

3943
Like all good DIY, you do not fully start from scratch: you start with a blueprint which someone else has created, or general building instructions.
4044
You usually do not grow your own trees to get the wood, you buy wooden blocks of approximately the right size; neither do you mix you own paint from elemental ingredients, you assemble what others have to offer.
@@ -274,10 +278,10 @@ When designing and building Dockerfiles, you effectively craft your own DIY Matr
274278
This may involve tinkering, some sawdust will fall off on the sides, but often the end product is quite presentable.
275279

276280
And that is one of the main purposes of a custom docker image: you can store a given set of interrelated software building blocks for later use (reproducibility).
277-
Some of these sets are rather rough, abstract, or general (like the images you get on image repositories, which you can [simply pull and run](../tutorials/development_containers_run)).
281+
Some of these sets are rather rough, abstract, or general (like the images you get on image repositories, which you can [simply pull and run](../../tutorials/development_containers_run)).
278282
Others are bespoke, containing exact requirements for a given task.
279-
Both functions are important building blocks of open science, and I elaborate more about this framework [in the main article on containerization](../tutorials/development_containers).
280-
Docker is a specific implementation of the container concept, and you might also want to [try out Podman](../tutorials/development_containers_podman) as an alternative.
283+
Both functions are important building blocks of open science, and I elaborate more about this framework [in the main article on containerization](../../tutorials/development_containers).
284+
Docker is a specific implementation of the container concept, and you might also want to [try out Podman](../../tutorials/development_containers_podman) as an alternative.
281285

282286
Good luck with all your DIY projects, and thank you for reading!
283287

content/tutorials/development_containers_build/index.qmd

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,11 @@ Next, it is time to customize your container.
3434
To give you a metaphor to work on: imagine you have a nice little DIY project for your garage workshop.
3535
This time, you would like to build your own [Matryoshka dolls](https://en.wikipedia.org/wiki/Matryoshka_doll) (матрёшка, stacking dolls, a great allegory for recursion).
3636

37-
https://images.unsplash.com/photo-1586010135736-c16373adf060?q=80
38-
(Photo by <a href="https://unsplash.com/@ilmatar?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash">Iza Gawrych</a> on <a href="https://unsplash.com/photos/a-group-of-blue-and-gold-vases-sitting-on-top-of-a-table-oL3O2PybLoo?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash">Unsplash</a>)
37+
<figure>
38+
<img src="https://images.unsplash.com/photo-1586010135736-c16373adf060?q=80" alt="build" />
39+
<figcaption aria-hidden="true">(Photo by <a href="https://unsplash.com/@ilmatar?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash">Iza Gawrych</a> on <a href="https://unsplash.com/photos/a-group-of-blue-and-gold-vases-sitting-on-top-of-a-table-oL3O2PybLoo?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash">Unsplash</a>)</figcaption>
40+
</figure>
41+
3942

4043

4144
Like all good DIY, you do not fully start from scratch: you start with a blueprint which someone else has created, or general building instructions.

0 commit comments

Comments
 (0)