ESTA ES UNA PREGUNTA DE MUESTRA! NUNCA LO HAGA EN PRODUCCIÓN. ¡EJECUTE NGINX / PHP / OTROS SERVICIOS EN CONTENEDORES SEPARADOS!
Cuando inicio, docker-compose upel contenedor de Ubuntu sale con ubuntu exited with code 0.
Cuando corro docker run -d -ti -p 80:80 -v ~/sph/laravel52:/www/laravel ubuntu, todo funciona bien.
¿Cómo puedo replicar este comportamiento usando Docker Compose?
Este es mi Dockerfile:
# Version: 0.0.1
FROM ubuntu:15.04
ENV DEBIAN_FRONTEND noninteractive
#INSTALL ALL
RUN apt-get update && apt-get install -y \
nano \
php5-fpm \
php5-mysql \
nginx
#NGINX CONF
ADD nginx/sites-available/laravel.conf /etc/nginx/sites-available/
RUN rm /etc/nginx/sites-available/default
RUN mv /etc/nginx/sites-available/laravel.conf /etc/nginx/sites-available/default
VOLUME /www
ENTRYPOINT nginx && service php5-fpm start && /bin/bash
CMD ["true"]
EXPOSE 80
Y docker-compose.yml:
version: '2'
services:
ubuntu:
build: .
container_name: ubuntu
volumes:
- ~/sph/laravel52:/www/laravel
ports:
- "80:80"
docker
docker-compose
Tim Devlet
fuente
fuente

ENTRYPOINT nginx && service php5-fpm start && /bin/bash. Pero si no comprende las implicaciones de esa decisión, puede leer el siguiente github.com/phusion/baseimage-dockerRespuestas:
La cuestión es que está utilizando la opción
-tcuando ejecuta su contenedor.¿Podría verificar si al habilitar la
ttyopción (ver referencia ) en su archivo docker-compose.yml, el contenedor sigue ejecutándose?fuente
ERROR: An HTTP request took too long to complete. Retry with --verbose to obtain debug information.después de agregartty: true?