FROM --platform=$TARGETPLATFORM in Podman and Docker
While building my erlang-cluster demonstration project for
multi-architecture, using podman, I noticed some weirdness about using FROM --platform=$TARGETPLATFORM
.
While building my erlang-cluster demonstration project for
multi-architecture, using podman, I noticed some weirdness about using FROM --platform=$TARGETPLATFORM
.
When I was investigating how to build multi-architecture containers in Podman, I noticed some … oddities. So I wrote them down. I’ll also compare podman’s behaviour to docker’s behaviour.
I noticed some differences between podman on WSL2 and podman on macOS recently. I spent some time investigating.
I run a number of docker containers on my Synology NAS, and I want to is put a reverse proxy in front of them. Since they’re defined in separate docker compose projects, I need to attach the reverse proxy to the network defined by each project.
I recently wanted to create an Ubuntu container image with some extra stuff installed, but I couldn’t be bothered to
create a Dockerfile
. It turns out that docker has a docker container commit
command, so I used that. Here’s how.
If you use the bridge
or host
network drivers in Docker, containers must use different port numbers to be accessible
on the host network. Here’s how to use the macvlan
driver to assign a unique IP address to each container, allowing
containers (and the host) to use the same port numbers.
Back in October, I wrote a post explaining how to do SSH forwarding with
docker build
. In November, I wrote about how to use multiple SSH identities with git. Unfortunately, these don’t always mix: using SSH in the docker build uses
the first SSH identity held by ssh-agent
, which might not be the one you wanted. Here’s how I got around this
problem.
If you’re building your application inside a Docker container, and you need to pull dependencies from a git server (e.g. Github or Gitlab) using SSH, you need to forward your SSH session to the container.
I noticed that whenever I made any change to the application, it caused the dockerpodman build to re-fetch and
recompile all of the dependencies. On the tiny laptop I was using at the time, this was taking several extra minutes for
every build.
Wherein I finally bring together all we’ve learned so far and stand this thing up properly.
When you want to push an image to a docker registry, you need to tag it with the registry name. Does the name matter?
Let’s see if we can push an image to our new Docker Registry.
I’ve got a bunch of Erlang nodes running in Docker containers, and I’d like to connect a remote shell, running on the host, to one of them.
Note: This is basically the same as the node.js server.
Now that I’ve successfully run nginx
on my cluster, I’m going to do the same with a simple node.js
server.