0
dockerfile을 사용하여 도커 컨테이너를 만들었습니다.docker 컨테이너에서 apche를 시작하지 못했습니다.
FROM ubuntu:12.04
RUN apt-get update && apt-get install -y apache2 && apt-get clean
ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2
EXPOSE 80
CMD ["/usr/sbin/apache2", "-D", "FOREGROUND"]
컨테이너를 만들고 성공적으로 실행했습니다. 내가 도커 서비스를 중단하고 다시 컨테이너를 시작했을 때. 컨테이너는 성공적으로 시작하지만, 아파치 그래서, 내가 용기에 로그인
[[email protected] ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
4283f23b1785 ubuntu/webserver "/usr/sbin/apache2..." 20 hours ago Up 8 minutes 0.0.0.0:80->80/tcp stoic_swartz
을 시작하지 못했습니다와 아파치 상태
[[email protected] ~]# docker exec -it stoic_swartz bash
[email protected]:/# /etc/init.d/apache2 status
Apache2 is NOT running.
[email protected]:/# /etc/init.d/apache2 start
* Starting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2 for ServerName
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
왜 아파치가 시작되지 않은 체크?
왜 사용하지 https : //로 hub.docker.com/_/httpd/? –