Mahendra Gaur
Mahendra Gaur

Reputation: 390

setup django on docker

I am new to docker and trying to steup my django project using docker first time. I am following https://docs.docker.com/compose/django/ Below are the files and their conents that am using. am using Ubuntu 16

Dockerfile

FROM python:3
ENV PYTHONUNBUFFERED 1
RUN mkdir /code
WORKDIR /code
COPY requirements.txt /code/
RUN pip install -r requirements.txt
COPY . /code/

docker-compose.yml

version: '3'

services:
  db:
    image: mysql
  web:
    build: .
    command: python manage.py runserver 0.0.0.0:8000
    volumes:
      - .:/code
    ports:
      - "8000:8000"
    depends_on:
      - db

requirements.txt

Django>=2.0,<3.0
psycopg2>=2.7,<3.0

I ran the below command

docker-compose run web django-admin startproject composeexample .

I have doubt in the below output:

.....:~/docker_practice$ docker images -a
REPOSITORY            TAG                 IMAGE ID            CREATED              SIZE
docker_practice_web   latest              be61fbfc4d9e        49 seconds ago       960MB
<none>                <none>              e73f8a4d68de        52 seconds ago       960MB
<none>                <none>              7b597f9f4615        About a minute ago   918MB
<none>                <none>              0eaf59a89be4        About a minute ago   918MB
<none>                <none>              cc42d26c3cfb        About a minute ago   918MB
<none>                <none>              ae64e2080658        About a minute ago   918MB
python                3                   02d2bb146b3b        11 days ago          918MB
mysql                 latest              b8fd9553f1f0        12 days ago          445MB


.......:~/docker_practice$ docker images
REPOSITORY            TAG                 IMAGE ID            CREATED             SIZE
docker_practice_web   latest              be61fbfc4d9e        52 seconds ago      960MB
python                3                   02d2bb146b3b        11 days ago         918MB
mysql                 latest              b8fd9553f1f0        12 days ago         445MB

When I run "docker images -a" It display 5 images with name as What this images are? where does it coming from ?

Upvotes: 1

Views: 56

Answers (1)

LinPy
LinPy

Reputation: 18578

the command docker images -a will show you also intermediate images, which is hidden in default using docker images

see this

Upvotes: 1

Related Questions