Construí uma imagem usando flask, nginx e uwsgi.
FROM ubuntu:14.04
MAINTAINER Ali Mezgani <[email protected]>
RUN apt-get update && apt-get -y install python python-dev python-pip
RUN apt-get -y install supervisor
RUN apt-get -y install nginx
COPY ./app /app
RUN mkdir /var/log/uwsgi/
RUN pip install -r ./app/requirements.txt
RUN rm -fr /etc/nginx/conf.d/*
RUN rm -fr /etc/nginx/sites-enabled/*
COPY app.conf /etc/supervisor/conf.d/app.conf
RUN echo "daemon off;" >> /etc/nginx/nginx.conf
COPY nginx.conf /etc/nginx/sites-enabled/app.conf
expose 80
CMD ["supervisord", "-n"]
CMD ["nginx"]
Aqui está a saída que recebo quando tento iniciar o contêiner myapp.
root@cygne:/data/flask# docker start myapp
Error response from daemon: No such container: myapp
Error: failed to start containers: myapp
E finalmente aqui está o status das imagens que tenho.
root@cygne:/data/flask# docker images -a
REPOSITORY TAG IMAGE ID CREATED SIZE
<none> <none> 91c4b97dc883 10 hours ago 434.1 MB
myapp latest 3b9dd7cc7006 10 hours ago 434.1 MB
<none> <none> 28f96039d2da 10 hours ago 434.1 MB
<none> <none> dbd7d20bb041 10 hours ago 434.1 MB
<none> <none> f29621c65c25 10 hours ago 434.1 MB
<none> <none> 7d6d99d831c4 10 hours ago 434.1 MB
<none> <none> 948cc751026f 10 hours ago 434.1 MB
<none> <none> afc13c68670c 10 hours ago 434.1 MB
<none> <none> 90733b74c1ff 10 hours ago 434.1 MB
<none> <none> f8252e26afe5 10 hours ago 424.4 MB
<none> <none> 4b16f8a9bfbb 10 hours ago 424.4 MB
<none> <none> 126961e5d0b2 10 hours ago 418.6 MB
<none> <none> 713635425c68 10 hours ago 400.1 MB
<none> <none> 0755786fa8dc 10 hours ago 396.2 MB
<none> <none> 3bc29edbc3a3 10 hours ago 188 MB
ubuntu 14.04 8f1bd21bd25c 3 weeks ago 188 MB
mysql 5.7 2fd136002c22 3 weeks ago 378.4 MB
O contêiner não inicia e tentei muitos processos, como limpar o cache, reiniciar o docker. Aqui está o que eu tenho no meu syslog:
localhost docker[6111]: time="2016-06-18T15:06:12.826760681Z" level=error msg="Handler for GET /v1.23/containers/myapp/json returned error: No such container: myapp"