DOCKER_WWWROOT在 docker-compose up -d "not set or not an existing directory"上给出错误



Docker, Docker -compose已根据Docker文档安装为Ubuntu 20.04的新安装

当我尝试运行撰写命令时,我得到以下错误:

***DOCKER_WWWROOT is not set or not an existing directory.

我之前运行了export ***DOCKER_WWWROOT=/path/to/myproject,并通过运行export确认路径正确。

declare -x ***DOCKER_WWWROOT值显示了我的正确路径。目录不存在

任何帮助都是感激的。***只是模板品牌名的占位符。

我的安装过程缺少一个步骤。需要以非root用户https://docs.docker.com/engine/install/linux-postinstall/添加运行docker的用户组来自docker文档:创建docker组sudo groupadd docker添加用户到组sudo usermod -aG docker $USER Activate group changesnewgrp dockerVerify docker can be run without sudo commandsdocker运行hello-world '

相关内容