A simple Docker Registry with Basic Auth Nginx Server and Let's Encrypt certificate
You have to create a .htpasswd
file and you can use the following command:
htpasswd -c registry.htpasswd username
package main | |
import ( | |
"fmt" | |
"os" | |
"os/exec" | |
"syscall" | |
) | |
func main() { |
# Assuming an Ubuntu Docker image | |
$ docker run -it <image> /bin/bash |