I try [instruction]
(https://github.com/Artur-/docker-nexus-npm-registry)
(I have Windows 10 and Hyper-V)
1. Install Docker. https://download.docker.com/win/stable/Docker%20fo...
2. Clone this repository git clone https://github.com/Artur-/docker-nexus-npm-registry
3. Build the image docker build -t nexus .
4. Create a folder where the Nexus cache is stored : mkdir data
5. Start the proxy and populate the cache docker run -p 8081:8081 --mount type=bind,source="$(pwd)/data",target=/nexus-data nexus
1-3 points succesfull gone:
> docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
nexus latest 24c0caf99780 18 hours ago 759MB
sonatype/nexus3 latest 35ca857d5b19 7 weeks ago 599MB
Without binding the image sonatype/nexus3 is started:
> docker run -p 8081:8081 sonatype/nexus3
and I get “Sonatype Nexus Repository Manager” through localhost:8081.
(Why I cannot run nexus image? Only sonatype/nexus3)
Where I should create /data folder?
I tried add to the end of Dockerfile:
Step 23/23 : RUN mkdir /tmp/data
.....
Successfully built 2d2249d2dab6
Successfully tagged nexus:latest
But while run it cannot find the data folder:
> docker run -p 8081:8081 --mount type=bind,source=/tmp/data,target=/nexus-data nexus
Error response from daemon: invalid mount config for type "bind": bind source path does not exist: /tmp/data.
> docker run -p 8081:8081 --mount type=bind,source=/tmp/data,target=/nexus-data sonatype/nexus3
Error response from daemon: invalid mount config for type "bind": bind source path does not exist: /tmp/data.
Also I see my history:
C:\GIT\docker-nexus-npm-registry>docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e6232bb3f7f4 24c0caf99780 "/bin/sh -c 'mkdir /…" 52 minutes ago Exited (1) 52 minutes ago cranky_rosalind
6d8598b49eaa 24c0caf99780 "/bin/sh -c 'mkdir $…" 53 minutes ago Exited (1) 53 minutes ago zealous_pascal
e0509608e436 24c0caf99780 "sh /tmp/start_nexus…" About an hour ago Exited (127) About an hour ago hungry_neumann
9740f0b537bb sonatype/nexus3 "sh -c ${SONATYPE_DI…" About an hour ago Exited (255) About an hour ago jolly_heyrovsky
7befe2c3f0b9 sonatype/nexus3 "sh -c ${SONATYPE_DI…" About an hour ago Exited (255) About an hour ago relaxed_gagarin
36d8e56f64dd 24c0caf99780 "sh /tmp/start_nexus…" About an hour ago Exited (127) About an hour ago crazy_greider
bdb70f0940c9 24c0caf99780 "sh /tmp/start_nexus…" About an hour ago Exited (127) About an hour ago optimistic_ellis
c318cd222d7c sonatype/nexus3 "sh -c ${SONATYPE_DI…" 2 hours ago Exited (0) 2 hours ago naughty_mcclintock
85e88836c714 24c0caf99780 "sh /tmp/start_nexus…" 2 hours ago Exited (127) 2 hours ago upbeat_nightingale
3d32a45d71f9 sonatype/nexus3 "sh -c ${SONATYPE_DI…" 2 hours ago Exited (255) 2 hours ago adoring_jang
65e3538e0128 24c0caf99780 "sh /tmp/start_nexus…" 2 hours ago Exited (127) 2 hours ago reverent_kepler
9b0dc9511680 sonatype/nexus3 "sh -c ${SONATYPE_DI…" 2 hours ago Exited (0) 2 hours ago laughing_taussig
7c6ae6c2938d 24c0caf99780 "sh /tmp/start_nexus…" 2 hours ago Exited (127) 2 hours ago agitated_tereshkova
c91b603469ea 24c0caf99780 "-p 28777:28777 -p 2…" 2 hours ago Created 8081/tcp elastic_burnell
9542b503c963 24c0caf99780 "sh /tmp/start_nexus…" 2 hours ago Exited (127) 2 hours ago hungry_leakey
a7f31803f97b 24c0caf99780 "sh /tmp/start_nexus…" 3 hours ago Exited (127) 3 hours ago clever_greider
9449244acd26 24c0caf99780 "sh /tmp/start_nexus…" 20 hours ago Exited (127) 20 hours ago unruffled_rosalind
What is “Created 8081/tcp elastic_burnell” ? Is it my succesfull image start?