Quick guide on how to setup either service mainly to compare them. You will probably need to do a few more things to make them production ready, checkout the respective documentation on Artifactory or Nexus to get a better idea. We will be using google cloud environment for this guide but you can can easily apply the instructions to other providers.
Requirements
Google cloud account (Or really any cloud service)
Setup
- Go to https://console.cloud.google.com/compute/ and create a new instance
- Select the checkbox
Deploy a container image to this VM
and it will change the bootdisk image toContainer-Optimised OS
NOTE:
Container-Optimised OS
can only have on docker application running on it at a time but it can swap between multiple relatively quickly. If you want to have both running at the same time you can create another instance following the instructions again or look into something like Kurbernetes (Out of scope for this guide)
You need to create a new firewall rule if you do not plan on using port 80
- Go here https://console.cloud.google.com/networking/firewalls/
- Add a new firewall rule and set the bottom value to
tcp:8081
(changing the number depending what port you would like to open)
ssh
into the server and then run one of the commands below depending what you want to install- Change the first number before the colon in
-p 8081:8081
to-p 80:8081
for standard http, or into something else depending what port your planning to use
- Change the first number before the colon in
Artifactory
docker run --name artifactory -d -p 8081:8081 docker.bintray.io/jfrog/artifactory-oss:latest
Nexus
docker run --name nexus -d -p 8081:8081 sonatype/nexus3
NOTE: It takes about a minute to setup the container, once its ready
- Go to
IP_ADDRESS_OF_YOUR_SERVER:8081
in your browser and follow the instructions- If you are using port 80 just type in the ip address without the port number
Troubleshooting
- If you used another provider and cannot access the website page:
- Check your iptables and make sure you allow incoming connections on the port you set the docker container to