Compare commits

...

3 Commits

Author SHA1 Message Date
36a58be0f1 Added note about volume mounts 2021-09-04 17:02:11 +01:00
c8f30073d9 More podman updates 2021-09-04 16:27:38 +01:00
b0e84f281d Added section about podman on windows 2021-09-04 16:01:27 +01:00
2 changed files with 29 additions and 2 deletions

View File

@ -1,6 +1,6 @@
.DEFAULT_GOAL := default
IMAGE ?= docker.cloud.cluster.fun/averagemarcus/blog:latest
IMAGE ?= docker.cluster.fun/averagemarcus/blog:latest
.PHONY: test # Run all tests, linting and format checks
test: lint check-format run-tests

View File

@ -14,6 +14,14 @@ There has been quite a bit of reaction to this news..."
2021-09-01: Added note about socket bugfix PR
2021-09-01: Added troubleshooting section about port forwarding bug
2021-09-04: Added note about switching to Podman on Windows
2021-09-04: Added update about port forwarding PR
2021-09-04: Added note about M1 Mac support
2021-09-04: Added volume mount limitation
</details>
Docker has [recently announced](https://www.docker.com/blog/updating-product-subscriptions/) that Docker Desktop will soon require a subscription and, based on the size of your company, may require a paid subscription. (It remains free for personal use)
@ -50,6 +58,8 @@ So, lets give it a whirl...
## Replacing Docker with Podman (on Mac)
> Note: This currently doesn't work for Macs with an M1 CPU. I've come across this post in my search - [Running Podman Machine on the Mac M1](https://www.cloudassembler.com/post/podman-machine-mac-m1/) - but I've not confirmed if it works or not.
1. `brew install podman`
2. Wait while brew downloads, builds and installs...
3. Create a virtual machine for Podman to run from:
@ -80,6 +90,10 @@ So, lets give it a whirl...
5. `alias docker=podman` (Add this to your `.bashrc` (if using Bash), `.zshrc` (if using ZSH) or whatever the correct file for your shell is)
6. 🎉
## Replacing Docker with Podman (on Windows)
I don't currently have access to a Windows machine where I can test this out but [Frank](https://twitter.com/frank_k_p) sent me this [on Twitter](https://twitter.com/frank_k_p/status/1433490007088668672) that covers the process needed for those on Windows with WLS2 - [How to run Podman on Windows with WSL2](https://www.redhat.com/sysadmin/podman-windows-wsl2).
## Troubleshooting
Ok, so it's not all *completely* pain free, there are a few issues you might hit...
@ -104,6 +118,19 @@ This seems to happen (for me at least) when I've previously run `podman machine
> UPDATE: Looks like this will be fixed in an upcoming release. - [PR](https://github.com/containers/podman/pull/11342)
### Volume mounts
```sh
✨ podman run --rm -it -v $(pwd):/usr/share/nginx/html:ro --publish 8000:80 docker.io/library/nginx:latest
Error: statfs /Users/marcus/web: no such file or directory
```
Podman machine currently has now support for mounting volumes from the host machine (your Mac) into the container on the virtual machine. Instead, it attepts to mount a directory matching what you specified from the _virtual machine_ rather than your Mac.
This is a fairly big issue if you're looking for a smooth transition from Docker Desktop.
There's currently a fairly active [issue](https://github.com/containers/podman/issues/8016) about this limitation but as of right now there doesn't seem to be a nice workaround or solution.
### Automatic published port forwarding
```sh
@ -125,7 +152,7 @@ The first is passing in the `--network bridge` flag to the podman command, e.g.
The other, more perminant option is to add `rootless_networking = "cni"` under the `[containers]` section of your `~/.config/containers/containers.conf` file.
To follow the progress of this bug, please refer to the [issue](https://github.com/containers/podman/issues/11396).
To follow the progress of this bug, please refer to the [issue](https://github.com/containers/podman/issues/11396). **UPDATE**: This has now been merged and is expected to be released in v3.3.2 in the next few days or so.
## short-name resolution