Setting up a Sonatype Nexus Repository Manager via docker-compose is far easier than you can imagine.

Make a docker-compose.yml file

1
2
3
4
5
6
7
8
9
10
11
version: "2"

services:
nexus:
restart: always
image: sonatype/nexus3
container_name: nexus3
volumes:
- "./nexus-data:/nexus-data"
ports:
- "8081:8081"
1
docker-compose up -d

Grant permission to nexus-data directory

Docker deployment will fall by default, all you have to do is fix the directory’s permission

1
chown -R 200 nexus-data