Просмотр исходного кода

FIX: Docker-compose file and Dockerfile

Fix #18816 : During the build of the docker-compose `web` service, in
the `Dockerfile` There is a command which attemps to modify
`/etc/hosts`. On my system This file is Read-only. Using the
`extra_hosts` parameter in `docker-compose.yml` instead fix the
problem.
FVolral 3 лет назад
Родитель
Сommit
c6e7881763
2 измененных файлов с 2 добавлено и 1 удалено
  1. 0 1
      build/docker/Dockerfile
  2. 2 0
      build/docker/docker-compose.yml

+ 0 - 1
build/docker/Dockerfile

@@ -57,7 +57,6 @@ RUN echo "host mail" >> /etc/msmtprc
 RUN echo "from local@localdomain.com" >> /etc/msmtprc
 RUN echo "domain localhost.localdomain" >> /etc/msmtprc
 RUN echo "sendmail_path=/usr/bin/msmtp -t" >> /usr/local/etc/php/conf.d/php-sendmail.ini
-RUN echo "localhost localhost.localdomain" >> /etc/hosts
 
 EXPOSE 80
 

+ 2 - 0
build/docker/docker-compose.yml

@@ -46,6 +46,8 @@ services:
         networks:
             - internal-pod
             - external-pod
+        extra_hosts:
+            - "localhost.localdomain:127.0.0.1"
 
     mail:
         image: maildev/maildev