-
Notifications
You must be signed in to change notification settings - Fork 0
Set Up nexus
- Build Server VM. Ubuntu-Docker Image. 4 CPU / 8 GB RAM / 160 GB store
- Build client VM. Docker image . Bare bones.
- Open additional fire wall rules for basic usage and for mor advanced.
ufw allow 8081/tcp ufw allow 8082/tcp ufw allow 9443/tcp
Create runtime account useradd nexus mkdir /home/nexus chown nexus /home/nexus usermod -aG docker nexus
Then su - nexus To get to where you need to go.
mkdir nexus-data docker volume create --name nexus-data docker run -d -v nexus-data:/nexus-data -p 8081:8081 -p 8082:8082 -p 9443:9443 --name nexus sonatype/nexus3
To debug / retrieve the default admin password. docker exec -it {image-name} /usr/bin/bash
At this stage the nexus image should be available and you can
- Log in
- Add group and proxy as per the image.
- Add docker security realm.
- Add anon user
- Add default local accounts.
Then a client needs modification. 1 useradd docker-client 9 usermod -aG docker docker-client
Edit the docker daemon file cat /etc/docker/daemon.json { "insecure-registries": ["138.68.228.92:8082"], "registry-mirrors": ["http://138.68.228.92:8082"] } service docker restart
http://138.68.228.92:8081/repository/docker-hub/v2/library/hello-world/manifests/latest
Should be able to force the proxy to work at this point http://138.68.228.92:8081/repository/docker-hub/v2/library/hello-world/manifests/latest and see images load and docker pull 138.68.228.92:8082/library/hello-world:latest Should work
docker login 138.68.228.92:8082
Should work.
Only down side with this is commns won't be encrypted and this needs to be reflected in the SOA