Compare commits
2 Commits
1a1c1217e9
...
d7ccad274c
Author | SHA1 | Date | |
---|---|---|---|
d7ccad274c | |||
de320346e3 |
@ -12,6 +12,8 @@ There has been quite a bit of reaction to this news..."
|
||||
<summary>Changelog</summary>
|
||||
|
||||
2021-09-01: Added note about socket bugfix PR
|
||||
|
||||
2021-09-01: Added troubleshooting section about port forwarding bug
|
||||
</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)
|
||||
@ -82,12 +84,16 @@ So, lets give it a whirl...
|
||||
|
||||
Ok, so it's not all *completely* pain free, there are a few issues you might hit...
|
||||
|
||||
### Failed to parse config
|
||||
|
||||
```sh
|
||||
Error: failed to parse query parameter 'X-Registry-Config': "n/a": error storing credentials in temporary auth file (server: "https://index.docker.io/v1/", user: ""): key https://index.docker.io/v1/ contains http[s]:// prefix
|
||||
```
|
||||
|
||||
Podman seems more strict than Docker when parsing the config file, check the `~/.docker/config.json` file for the key with the `https://` prefix (as mentioned in the error message) and remove it.
|
||||
|
||||
### Sock already exists
|
||||
|
||||
```sh
|
||||
✨ podman machine start
|
||||
ERRO[0000] "/var/folders/x_/bfc7v6kn4fs0rl9k77whs0nw0000gn/T/podman/qemu_podman-machine-default.sock" already exists
|
||||
@ -98,14 +104,37 @@ 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)
|
||||
|
||||
### Automatic published port forwarding
|
||||
|
||||
```sh
|
||||
✨ podman run --rm -it --publish 8000:80 docker.io/library/nginx:latest &
|
||||
✨ curl http://localhost:8000
|
||||
|
||||
curl: (7) Failed to connect to localhost port 8000: Connection refused
|
||||
```
|
||||
|
||||
The current latest version of Podman ([v3.3.1](https://github.com/containers/podman/releases/tag/v3.3.1)) has a bug where the automatic port forwarding from host to VM when publishing a port with the `-p / --publish` flag doesn't work.
|
||||
|
||||
There's currently a couple workarounds for this:
|
||||
|
||||
The first is passing in the `--network bridge` flag to the podman command, e.g.
|
||||
|
||||
```sh
|
||||
✨ podman run --rm -it --publish 8000:80 --network bridge docker.io/library/nginx:latest
|
||||
```
|
||||
|
||||
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).
|
||||
|
||||
## short-name resolution
|
||||
|
||||
```sh
|
||||
Error: error creating build container: short-name resolution enforced but cannot prompt without a TTY
|
||||
```
|
||||
|
||||
Ok, this is the big one and the major issue you'll likely hit making the switch today from Docker to Podman. Lets dive into it in a bit more detail...
|
||||
|
||||
## short-name resolution
|
||||
|
||||
First we need to understand what a short-name is in this context. It refers to container images that don't have a full domain name prefixed. You've likely come across these quite a lot before - e.g. `alpine:latest`, `ubuntu:12`, `giantswarm/pause:latest`, etc.
|
||||
|
||||
When using Docker, these images are actually first prefixed with `docker.io` (or `docker.io/library` for those official images without a namespace) before being pulled.
|
||||
|
Loading…
Reference in New Issue
Block a user