如何从终端卸载 mailcow?

如何从终端卸载 mailcow?

我最近使用以下命令从终端安装了 mailcow

$cd /opt
$sudo git clone https://github.com/mailcow/mailcow-dockerized
$cd mailcow-dockerized

我尝试使用以下命令进行卸载;

docker-compose down -v --rmi all --remove-orphans

我收到以下错误;

Traceback (most recent call last):
  File "bin/docker-compose", line 6, in <module>
  File "compose/cli/main.py", line 72, in main
  File "compose/cli/main.py", line 125, in perform_command
  File "compose/cli/command.py", line 47, in project_from_options
  File "compose/config/environment.py", line 77, in from_env_file
  File "compose/config/environment.py", line 72, in _initialize
  File "compose/config/environment.py", line 43, in env_vars_from_file
  File "/code/.tox/py37/lib/python3.7/codecs.py", line 904, in open
PermissionError: [Errno 13] Permission denied: './.env'
[46234] Failed to execute script docker-compose

答案1

完整的安装指南可以在这里找到这里.(问题中的安装说明不完整)

如果你打算卸载,mailcow-dockerized请按照卸载指南

docker-compose down -v --rmi all --remove-orphans

答案2

不确定我是否迟到了,但是当我以普通用户身份(而不是以根用户身份)运行此命令时出现了此错误。

如果以 root 用户身份登录后仍然收到错误消息(例如 HTTP 请求花费太长时间才能完成),请检查您是否已登录/opt/mailcow-dockerize,然后尝试:

docker-compose stop

然后运行卸载命令

docker-compose down -v --rmi all --remove-orphans

相关内容