These scripts create a simple Oracle Linux 8 vm that contains Podman, Buildah, Skopeo, runc, git and other useful tools for playing with containers. You can use it as an alternative to Docker Desktop.
- Clone this repo:
git clone https://github.com/michalgutowski/container-tools.git
- Provision the vm with Vagrant:
cd container-tools
vagrant up
- Install podman on your MacOS
brew install podman
- Configure podman remote client on your MacOS. Run the following command in this directory:
podman-remote system connection add vagrant --identity `pwd`/id_rsa ssh://[email protected]/run/user/1000/podman/podman.sock
This will add a default connection for user vagrant
- Test the connection
podman-remote info
- Check if you can pull and run an nginx container
podman-remote run -it --rm -d -p 8080:80 --name web nginx
Navigate to http://192.168.99.100:8080 and you should see nginx welcome screen.
You can also add following lines to you /etc/hosts file on your MacOS to use hostname instead of IP address.
192.168.99.100 podman
You can use vagrant suspend
to simply suspend the vm when not needed and vagrant resume
to start it up again.
To add any custom image registries simply login to the vm and modify the registries.conf
file:
vagrant ssh podman
vi /etc/containers/registries.conf