Setting up 2 containers
by Christoffer Reijer
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.
Any ideas?
5 years, 4 months
Including file system changes in container migration
by Adrian Reber
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
tmpfs directories.
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
// behaviors.
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?
Adrian
5 years, 5 months
Inter-container communication in pod
by Dominik Matis
Hi,
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.
Best regards,
Dominik Matis
5 years, 5 months
Question regarding volumes and permissions
by Eric Gustavsson
Hi all,
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
https://github.com/dani-garcia/bitwarden_rs/issues/506
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
[ROCKET_PORT=8080,ENABLE_DB_WAL=false] -v
/home/spytec/Bitwarden/bw-data/:/data/ -p 8080:8080
bitwardenrs/server:latest
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?
Thanks,
Eric Gustavsson
Associate Software Engineer
Red Hat <https://www.redhat.com>
<https://www.redhat.com>
5 years, 5 months
Podman Mailing List is Live!
by Tom Sweeney
Hi All,
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.
Questions? Holler!
Thanks all,
t
5 years, 5 months