场景
Ubuntu Server 上使用Docker Compose 部署Nexus(图文教程):
在上面部署好Nexus后,启动后日志提示:
Unable to create directory /nexus-data/instance
注:
实现
这是因为在docker-compose.yml中配置了数据卷。
version: '3'
services:
nexus:
restart: always
image: sonatype/nexus3
container_name: nexus3
ports:
- 8081:8081
volumes:
- /usr/local/docker/nexus/nexus-data:/nexus-data
但是没有对数据卷目录授权。
所以需要对nexus-data授权,这里先授予所有权限。
chmod 777 nexus-data/