J'ai modifié le Dockerfile pour que ça fonctionne.
FROM alpine:3.6
ADD . /app
RUN apk add -U nodejs git nodejs-npm php7 php7-json\
&& cd /app \
&& npm -y install -g bower \
&& bower install --allow-root\
&& apk del nodejs nodejs-npm \
&& rm -rf /var/cache/apk/*
WORKDIR /app
CMD ["php", "-S", "0.0.0.0:8080"]
Ça marche très bien. J'ai juste un soucis quand j'essaye d'utiliser le proxy nginx de Jwilder dans mon docker-compose.
version: '2'
services:
nginx-proxy:
restart: always
image: jwilder/nginx-proxy
ports:
- "80:80"
- "443:443"
volumes:
- /srv/docker/nginx/certs:/etc/nginx/certs:ro
- /etc/nginx/vhost.d
- /usr/share/nginx/html
- /var/run/docker.sock:/tmp/docker.sock:ro
nginx-proxy-companion:
image: jrcs/letsencrypt-nginx-proxy-companion
volumes:
- /srv/docker/nginx/certs:/etc/nginx/certs:rw
- /var/run/docker.sock:/var/run/docker.sock
volumes_from:
- nginx-proxy
tardistart:
container_name: tardistart
build: ./tardistart
environment:
- VIRTUAL_HOST=test.toto.fr
- LETSENCRYPT_HOST=test.toto.fr
- LETSENCRYPT_EMAIL=contact@toto.fr
volumes:
- /srv/docker/tardistart/:/app
J'obtiens les erreurs suivantes :
nginx.1 | test.serveur.fr 89.13.155.130 - - [27/Jun/2017:13:10:20 +0000] "GET / HTTP/2.0" 502 173 "-" "Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:54.0) Gecko/20100101 Firefox/54.0"
nginx.1 | 2017/06/27 13:10:25 [error] 123#123: *6934 no live upstreams while connecting to upstream, client: 89.13.155.130, server: test.serveur.fr, request: "GET / HTTP/2.0", upstream: "test.serveur.fr", host: "test.serveur.fr"
J'ai essayé cette solution sans succès 💯 https://github.com/jwilder/nginx-proxy/issues/395