How do I set up Docker to work with Artifactory on a non-standard SSL port

In order to configure Docker to push images to Artifactory using SSL on a port other than port "443", please use the following steps:

1. Edit the .dockercfg file (typically located in your docker-user's home directory) so that the URL will include the SSL listening port, for example:


  "" : 


      "auth" : "YWRtaW46QVAyZFVadUM0WEh4Z1Q2cld1aHExdlNBMkRk",

      "email" : ""



2. Edit the nginx.conf file to listen to the SSL port and add the port to the the "proxy_set_header Host $host" line, for example:

listen 5000 ssl;

proxy_set_header Host $host:5000;

Please reload NGINX after making the changes above (sudo nginx -s reload)

3. Tag the docker image that you want to push, so that it will include the SSL port, for example,

docker tag ubuntu

4. Run "docker push" to push the image, for example:

docker push