



Now start Nexus as a daemon cd /etc/nexus docker-compose up -dįollow Nexus logs with docker logs -f nexus_nexus_1Īnd check status of the Nexus container with docker ps -a On EC2 host, create a new Nexus directory, a Data directory (we can use this dir for backups), and create a new Docker-Compose file mkdir /etc/nexus mkdir /etc/nexus/nexus-data touch /etc/nexus/docker-compose.yamlĪdd the following to the YAML version: "2" services: nexus: image: sonatype/nexus3 volumes: - "/etc/nexus/nexus-data:/nexus-data" ports: - "8081:8081" volumes: nexus-data: Ĭhange the Data directory permission so Docker can access it chown -R 200 /etc/docker/nexus-data Make sure Docker is running sudo systemctl start rvice Configure & Start Nexus Install docker-compose sudo pip install docker-compose Install docker # add Repo yum-config-manager -add-repo # install sudo yum install docker-ce My Nexus repo is run on an EC2 instance (I’m using a T2.medium with 4G RAM and 40G SSD space, but if you plan on using this repo heavily, I suggest getting larger EC2 instance).
