aboutsummaryrefslogtreecommitdiff
path: root/content/posts/2023-05-02-bookworm-and-podman.md
blob: 0fbe4d3719fea193f1ae3b98018ef532786a0bf0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
slug: bookworm-and-podman
title: "Bookworm and Podman"
date: "2023-05-02T01:27:00-04:00"
---
I've spent the last couple days fiddling with [Debian Bookworm
RC2][bookworm] in a VM.  No issues to report.  It's shaping up to be
a great release.

I've been looking for a suitable [Docker][] replacement for a few years
because of [their repeated license shenanigans][license-shenanigans].
Last year I tried switching to [Podman][], but ran into into several
incompatibilities and minor annoyances.

[Podman 4.3][podman-4.3] ships with [Bookworm][] and seems to fix all
the issues I had before.  [Rootless containers][], [multi-stage
builds][multi-stage], and all of my muscle-memory `docker` commands now
work as expected.  There is even a decent clone of [docker-compose][]
named (surprise!) [podman-compose][].

The only real differences I noticed are:

1. The command is `podman` instead of `docker`.
2. Image names must be registry-prefixed.  Example: `FROM docker.io/bash` instead of `FROM bash`.
3. Searches must be registry-prefixed.  Example: `podman search docker.io/pablotron`.

A couple of quick tests:

* [Sinatra web application (rootless)][sinatra-test]
* [Go web application (rootless, scratch, multi-stage build)][go-test]

**Update (2023-05-05):** I put together a simple web application named
[Bookman][] to put [podman-compose][] through it's paces.  It uses
multi-containers, [multi-stage builds][multi-stage], boot dependencies,
secrets, and volumes.

[Here's a log of the setup process][bookman-gist], and [here's a
screenshot][bookman-shot] of the exposed web interface.

[bookworm]: https://www.debian.org/releases/bookworm/
  "Debian bookworm."
[debian]: https://debian.org/
  "Debian Linux."
[docker]: https://www.docker.com/
  "Docker container manager."
[podman]: https://podman.io/
  "Podman container manager."
[podman-4.3]: https://podman.io/releases/2022/10/22/podman-release-v4.3.0.html
  "Podman version 4.3."
[rootless containers]: https://developers.redhat.com/blog/2020/09/25/rootless-containers-with-podman-the-basics
  "Rootless containers."
[multi-stage]: https://docs.docker.com/build/building/multi-stage/
  "Multi-stage build."
[sinatra-test]: https://gist.github.com/pablotron/86cb0b355ac3e4cef3b28b3e0718314d
  "Test Sinatra web application running in a Podman container."
[go-test]: https://gist.github.com/pablotron/03785b66cc9e90ebd5fdaef5642baa6d
  "Test Go web application running in a Podman container."
[license-shenanigans]: https://blog.alexellis.io/docker-is-deleting-open-source-images/
  "Docker is deleting Open Source organizations (updated)."
[podman-compose]: https://github.com/containers/podman-compose
  "Podman-compatible clone of Docker Compose."
[docker-compose]: https://docs.docker.com/compose/
  "Tool for defining and running multi-container Docker applications."
[bookman]: https://github.com/pablotron/bookman
  "Bookman GitHub repository."
[bookman-gist]: https://gist.github.com/pablotron/f19037d1718224611efd7aa6e05f82b6
[bookman-shot]: /files/posts/bookworm-and-podman/bookman.png
  "Bookman web interface deployed via podman-compose."