ubuntu 18.04 中 docker 上 drupal 和 apache2 的端口冲突
port conflicts for drupal as well as for apache2 on docker in ubuntu 18.04
我已经在 ubuntu 18.04 上安装了 docker。在 docker 中,我创建了一个 Drupal 8 图像,另一个是 mysql。 MySQL 需要 apache2,它是 8080,Drupal 也需要端口 8080。我应该怎么做才能使用 apache2 和 Drupal?
您可以在 apache 容器中将 apache 端口从 8080 更改为 8081,同时按照下面给出的命令启动它
docker run -dit --name my-running-app -p 8081:80 my-apache2
然后您可以使用 8081 端口从 mysql 连接到 apache2。
我已经在 ubuntu 18.04 上安装了 docker。在 docker 中,我创建了一个 Drupal 8 图像,另一个是 mysql。 MySQL 需要 apache2,它是 8080,Drupal 也需要端口 8080。我应该怎么做才能使用 apache2 和 Drupal?
您可以在 apache 容器中将 apache 端口从 8080 更改为 8081,同时按照下面给出的命令启动它
docker run -dit --name my-running-app -p 8081:80 my-apache2
然后您可以使用 8081 端口从 mysql 连接到 apache2。