创建docker-compose.yml文件

version: '3'
services:
  nexus:
    image: 'sonatype/nexus3'
    container_name: nexus
    restart: always
    environment:
      - TZ=Asia/Shanghai
    ports:
      - '8081:8081'
    volumes:
      - './nexus-data:/nexus-data'

执行部署命令

前提已经安装好docker-compose

docker-compose up -d

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐