This seems like a pretty basic use case but I cannot seem to find out how
to do this:
I want to create two containers, foo and bar, and have them talk to each
other on ports that are not exposed to anything else. I used to do this by
creating a docker network, my_network, that I attached my two containers
to, and then I could access foo.my_network from the bar container. But how
moving to RHEL 8 I have to port my code away from Docker and I can't figure
out how to get my two containers to talk. It works fine on IP (10.88.0.10
and 10.88.0.11) but I would prefer to use the name since I don't trust the
IP to be the same at every run.
The current container migration implementation in Podman cannot handle
changes to the file-system.
If a container changes a file the recommendation is to mount that
directory as a tmpfs and then the changed file will be correctly
migrated to the destination system. If something changes a file in /tmp
for example, following steps are currently necessary:
# podman run -d --tmpfs /tmp <container>
# podman container checkpoint -l -e /tmp/chkpt.tar.gz
# scp /tmp/chkpt.tar.gz destination-host:/tmp
On the destination host of the migration:
# podman container restore -i /tmp/chkpt.tar.gz
Files changed in /tmp in the container will also be in the restored
container on the destination host, because CRIU automatically handles
To make it easier for users to not have to mark all changed directories
as --tmpfs I would like to include changed files in the checkpoint
archive (/tmp/chkpt.tar.gz from my example).
One possible implementation could use vendor/github.com/containers/storage/store.go:
// Diff returns the tarstream which would specify the changes returned
// by Changes. If options are passed in, they can override default
Diff(from, to string, options *DiffOptions) (io.ReadCloser, error)
This sounds exactly like what I need. I get a tarstream which I can
embed into the checkpoint archive and which can then be used with
ApplyDiff() before restoring the container.
Does this sound like the right approach to also migrate file-system
changes during container migration?
I have a situation in which I have React app in container, which is exposed
to port 3000 to be able to access it from host and I also have another
container for Express API server, which is listening on port 8000, but I
don't want it to be accessible from host. Is it somehow possible to run
these two containers simultaneously in one pod and have exposed only port
3000, so we can see the page? Thanks for a reply.
I got a bit on an issue trying to spin up a container with a volume mounted
to the container's /data directory. Got a related issue here but I believe
I'm just missing out on something Podman specific
When I run this command and mount /bw-data to container's /data the
bitwardenrs image can't write to it.
podman run -d --user 1001 --name bitwarden -e
/home/spytec/Bitwarden/bw-data/:/data/ -p 8080:8080
Inside the container the /data directory is assigned to root, outside the
container /bw-data has 0777 permissions and belong to myself (user 1001).
Am I missing something?
Associate Software Engineer
Red Hat <https://www.redhat.com>
Duck Dequenes and Sanja Bonic were able to help Dan and I through
the last hurdles to getting the list up and running appropriately.
Many thanks to Ed Santiago who found a last minute issue with the setup
that has since been corrected.
So feel free to advertise the list as you wish. Send an email to:
podman-join(a)lists.podman.io with the word "subscribe" in the title, or
by going to https://lists.podman.io and scrolling to the bottom of that
page to subscribe.
Note: The Buildah mailing list will be moving from
buildah(a)lists.podman.io to buildah(a)lists.buildah.io. There's still a
few tweaks left there, please don't advertise that one ATM.