Reputation: 8971
new to dockers.
running this docker build .
this is the Dockerfile
FROM gcr.io/google_appengine/python
# Create a virtualenv for dependencies. This isolates these packages from
# system-level packages.
RUN virtualenv /env
# Setting these environment variables are the same as running
# source /env/bin/activate.
ENV VIRTUAL_ENV /env
ENV PATH /env/bin:$PATH
# Copy the application's requirements.txt and run pip to install all
# dependencies into the virtualenv.
#ADD requirements.txt /app/requirements.txt
#RUN pip install -r /app/requirements.txt
# Add the application source code.
ADD . /app
# Run a WSGI server to serve the application. gunicorn must be declared as
# a dependency in requirements.txt.
CMD gunicorn -b :$PORT main:app
CMD bash1 "while true; do echo hello; sleep 1;done"
CMD ["sh", "while true; do echo hello; sleep 1;done"]
CMD "echo" "Hello docker!"
but after, when I run docker ps
I don't see the image.
Upvotes: 0
Views: 2126
Reputation: 3838
To build an image you have to use:
docker build -t username/imagename .
You have to use -t
to tag your image and give it a name, from the docs:
-t, --tag value Name and optionally a tag in the 'name:tag' format (default [])
Then you can see the list of your images using:
docker images
You are using docker ps
which is for listing containers not images.
More info about about images and containers.
Check the documentation on docker build.
Upvotes: 2
Reputation: 1181
use 'docker run ' to create and run a container. all docker build does is create an image.
Upvotes: 1