Dealing with containers on the mainframe has its very own challenges. If you have internet access from your zLinux instance you’re fine — do as always, just be aware of the s390x instruction set architecture.
If you have no internet access you have two challenges:
- You have to pull the image, store it, transfer it to zLinux “by hand” and load it on zLinux.
- You have to pull the image on a distributed platform, which usually means that you have to pull one for a different arch than the one of your machine.
What I recommend you to do:
docker pull --platform s390x nginx:latest
docker save -o nginx.latest.tar nginx:latest
Why not docker export?
An image file produced by docker save
contains all parent layers, and all tags and versions, or specified repo:tag, for each argument provided.
docker export
just creates a plain image of the currently compiled image, discarding all information on parent layers, tags etc..
On zLinux:
docker load -i nginx.latest.tar
The better way (with more effort and out of scope of this document): Implement your own registry.
Then you can docker pull
directly on zlinux.
How does this help? On its own nothing. You still need to push images to the repo, and they have to come from somewhere. But maybe a repo is a way to bridge the gap to the internet in your infrastructure by not running on zLinux.