How to set a Docker registry in JFrog Artifactory with a RepoPath method? [Video]

Ezekiel Knox
2021-02-02 14:38

How to set a Docker registry in JFrog Artifactory with a RepoPath method?

 

Video Transcription

Hi, my name’s Ezekiel knots from JFrog support, and in this short video, I will show you how to set up Docker registries with nginx reverse proxy using the rebuild path method. Let’s start. Here’s a brief overview of what we’ll be going over in today’s video. We’ll set up the repository path method in the artifactory UI, configure our artifactory.com file and do a Docker login and Docker pull down. I would like to clarify that the repository path method isn’t recommended for production systems as a Docker API can change and break the product. The recommended method is sub domain, which will be a topic of one of my other videos that I’ve created. Let’s start. Next I’ll show you how to set up the repository path method and the artifactory UI you’re going to want to navigate to your administration panel, click on artifactory and HTTP settings.

Here we’re going to want to make the Docker access method repository path our service provider Nginx. My internal host name is local host, but yours may differ. My public server name is art dot local, but yours should depend on whatever you have as your custom base URL in artifactory. Here I’ll make my HTT port 80 and my HTTPS port 443, and I will set the path that I want my self signed certificates to reside in. And then you click save, after the saved, download the file and we’ll show you what to do with that a little later. Next we’re going to want to create our artifactory.com file. Please note that to continue, you will need SSL certificates that are signed by a CA authority. If self-signed certificates are used, the Docker client will complain that they have been signed by an unknown authority and throw an error. We’re going to want to go to our sites enabled folder. Now that we’re in, we’re going to remove this default file and now create our artifactory.com file.

Now we are going to want to open the artifactory.com file that we downloaded earlier, copy its contents and paste it within the file. And we should be good to go, save and quit. Once the file has been saved, please restart Nginx with the command service, nginx restart. Now that everything has been created, we should be able to do a Docker login and Docker pull. So to do a Docker login, and you’re going to want to run the command Docker login and then your server name, art.local 443. And you’re going to watch your credentials

And we are in, please note that the credentials used to login will be the same credentials you used to log into artifactory. And now that we’re logged in, we can do a Docker pull. So Docker pull, we want to do the same thing, art.local 443 and we want to specify what repository we want to pull it from. I’ll be pulling from Docker remote, and I want the centralized image. Now we can check this on artifactory.To check this, we will go to artifactory, then artifacts and check our doc remote repository. And there it is our centralized image. Now I’ll do a Docker push to do so. You’re going to want to first pull the image locally, so Docker pull, nginx.

Now that the images in pulled we’re going to want to tag it. I will do Docker tag, Nginx, art.local 443, Docker local with the tag of n2 after it’s been tagged, you can do a Docker push, Docker push art.local 443 and we’re going to want to push Docker local n2. Now that the image has been pushed, we can view it in artifactory and our Docker local repository, and here it is. And that was my video on setting up your Docker registries with an internet reverse proxy, using the repository path method. Thanks for watching, and I hope you enjoyed. Feel free to leave your comments, feedback, or questions in the comment section below.

 

Additional Resources: