Running Laravel Sail with Podman

Start the Podman system service

Be sure the podman-docker and docker-compose packages are installed. After installing the packages, start the Podman systemd socket-activated service using the following command:

sudo systemctl start podman.socket

Verify the system service is running by hitting the ping endpoint and see if we get a response. This step needs to be successful before we can proceed further.

sudo curl -H "Content-Type: application/json" --unix-socket /run/podman/podman.sock http://localhost/_ping
OK

Link to the socket file

Then we link the expected docker.sock file path to the new podman.sock file that we just created via the podman.socket unit. And give our user R/W permission to it, so we can work with it, without running everything with sudo.

cd /run && sudo ln -vfs podman/podman.sock docker.sock && sudo chown $USER -R /run/podman

And let’s check again the ping endping to make sure the link is working.

curl -H "Content-Type: application/json" --unix-socket /var/run/docker.sock http://localhost/_ping

Resources

  • https://fedoramagazine.org/manage-containers-with-podman-compose/
  • https://github.com/containers/podman-compose/issues/276
  • https://www.redhat.com/sysadmin/podman-docker-compose
  • https://github.com/laravel/sail/issues/83

You may also like...

Leave a Reply

Your email address will not be published.