创建目录
mkdir data
cd data
mkdir nexus-data
# 设置文件夹权限
chmod 777 /data/nexus-data
拉取镜像
podman pull docker.io/sonatype/nexus3
运行
podman run --net=host --privileged=true -p 8081-8089:8081-8089 --name nexus -v /data/nexus-data:/nexus-data docker.io/sonatype/nexus3
```shell
设置端口转发
netsh interface portproxy add v4tov4 listenport=8081 listenaddress=0.0.0.0 connectport=8081 connectaddress=172.26.243.0 protocol=tcp
netsh interface portproxy add v4tov4 listenport=8153 listenaddress=0.0.0.0 connectport=8153 connectaddress=172.26.243.0 protocol=tcp
查看端口转发
netsh interface portproxy show all
删除端口转发
netsh interface portproxy delete v4tov4 listenport=8081 listenaddress=0.0.0.0 ``` 管理员密码在:/data/nexus-data 下