From 0f810dd20ddb8ab427c68bb40de68113af8d6dc2 Mon Sep 17 00:00:00 2001 From: Malanius Privierre Date: Tue, 15 Jun 2021 21:10:40 +0200 Subject: [PATCH] Fix creation of htpasswd file in for registry The guide states that to create the `htpasswd` we need to run the following command: ```bash docker run --entrypoint htpasswd registry:latest -Bbn moby gordon > auth/htpasswd ``` This fails with following error as the `htpasswd` is not part of the registry image: ```bash docker: Error response from daemon: OCI runtime create failed: container_linux.go:370: starting container process caused: exec: "htpasswd": executable file not found in $PATH: unknown. ERRO[0001] error waiting for container: context canceled ```` According to the [docs](https://docs.docker.com/registry/deploying/#native-basic-auth), the file should be generated with `httpd` image. --- _posts/2017-02-27-linux-registry-part2.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2017-02-27-linux-registry-part2.markdown b/_posts/2017-02-27-linux-registry-part2.markdown index f466a1d..799efa5 100644 --- a/_posts/2017-02-27-linux-registry-part2.markdown +++ b/_posts/2017-02-27-linux-registry-part2.markdown @@ -108,7 +108,7 @@ The registry server and the Docker client support [basic authentication](https:/ Create the password file with an entry for user "moby" with password "gordon"; ```.term1 mkdir auth -docker run --entrypoint htpasswd registry:latest -Bbn moby gordon > auth/htpasswd +docker run --entrypoint htpasswd httpd:2 -Bbn moby gordon > auth/htpasswd ``` The options are: