How are docker credentials saved in podman?

2.2k Views Asked by At

In docker whenever we login to a registry their credentials get saved in the config.json file right?

How is this done in podman? where are the credentials saved when I have podman installed and i do docker login into a registry? If i have podman installed, will the .docker/config.json not get created?

Can I know how this config.json functionality is handled in podman?

1

There are 1 best solutions below

3
On BEST ANSWER

Per the podman-login man page the credentials are stored in $XDG_RUNTIME_DIR/containers/auth.json (assuming Linux). For example, mine is stored in /run/user/1000/containers/auth.json. It will use .docker/config.json if it exists, but it will not create it.

If you want to change this behavior, you can specify the --authfile switch or set the REGISTRY_AUTH_FILE environment variable.