Docker - Conteneurs étant retiré après la construction

- Je construire mon projet avec Dockerfile:

FROM ubuntu:14.04

#"updating package repos.."
RUN apt-get update

#"installing required packages.."
RUN apt-get -y install python2.7-dev build-essential python-pip
run apt-get -y install libjpeg-dev libpng3 libpng12-dev
run apt-get -y install nodejs npm nodejs-legacy
run npm install -g peer
run apt-get -y install supervisor

#"creating sites folder under /opt"
run mkdir /opt/sites

#"copying project into /opt/sites"
add project-latest /opt/sites/project-latest

#"copying supervisor conf into /etc/supervisor/conf.d"
add etc/project.conf /etc/supervisor/conf.d/

#"installing virtualenv"
run pip install virtualenv

#"change working dir to /opt/sites/project-latest"
workdir /opt/sites/project-latest

#"create vritualenv folder named 'env' "
run virtualenv env

#"activating environment"
run . env/bin/activate

#"installing packages into env from requirements.txt"
run pip install -r requirements.txt

#"syncing DB"
run python manage.py syncdb

#"migrating DB"
run python manage.py migrate

#"update and restart supervisorctl"
run service supervisor start
cmd supervisorctl reread
cmd supervisorctl update
cmd supervisorctl restart all

#"expose 8000 and 9000 ports"
expose 8000
expose 9000

Et c'est le résultat final du processus de construction:

Successfully built 29dbd8e8bb0a
Removing intermediate container 8a20545921e0
Removing intermediate container 0da63841f6ad
Removing intermediate container fab164fe93c2
Removing intermediate container 77b61eceef36
Removing intermediate container 87a24b079f47
Removing intermediate container cb2520749e30
Removing intermediate container 9e9c54376433
Removing intermediate container 130f6eaeed6a
Removing intermediate container 56f9d93a1e75
Removing intermediate container 599b10008caa
Removing intermediate container eab7598a5e95
Removing intermediate container c31b58fcc405
Removing intermediate container 8b4a55fbb345
Removing intermediate container 13b35d86044e
Removing intermediate container 0ab10eef8f5e
Removing intermediate container ebf42d9493f1
Removing intermediate container 70c772c4aa73
Removing intermediate container fe5039bfbe15
Removing intermediate container 8f9a93cd5438
Removing intermediate container 2d673cf029f8
Removing intermediate container ab8485d09ee7
Removing intermediate container 0fdfa200ac27
Removing intermediate container d2d02358e25d

Si je créer un conteneur pour exécuter bash construit à l'intérieur de mon image, je vois certaines étapes de construction sont oubliés. j'.e, il n'y a pas d'environnement virtuel avec mon requirements.txt fichier.

Et je n'ai aucune idée de comment faire pour ouvrir ma course django application à partir de mon ordinateur hôte. Il n'y a aucune ports ou IP info soit.

InformationsquelleAutor alix | 2014-06-16