Docker Image Server nexus

 

sonatype/nexus3 - Docker Image | Docker Hub

  1. Use a docker volume. Since docker volumes are persistent, a volume can be created specifically for this purpose. This is the recommended approach.

    $ docker volume create --name nexus-data
    $ docker run -d -p 8081:8081 --name nexus -v nexus-data:/nexus-data sonatype/nexus3
  2. Mount a host directory as the volume. This is not portable, as it relies on the directory existing with correct permissions on the host. However it can be useful in certain situations where this volume needs to be assigned to certain specific underlying storage.

    $ mkdir /some/dir/nexus-data && chown -R 200 /some/dir/nexus-data
    $ docker run -d -p 8081:8081 --name nexus -v /some/dir/nexus-data:/nexus-data sonatype/nexus3

修訂版本 #1
ç”± treeman 建立於 17 ¤G¤ë 2022 01:27:04
ç”± treeman æ›´æ–°æ–¼ 5 ¤­¤ë 2023 10:14:58