Test Django + Build Docker Image

I would like to test Django and build a docker image every commit.

I have Django testing working fine:

image: python:3.6



# This folder is cached between builds
# http://docs.gitlab.com/ce/ci/yaml/README.html#cache
cache:
  paths:
  - ~/.cache/pip/

# This is a basic example for a gem or script which doesn't use
# services such as redis or postgres
before_script:
  - python -V                                   # Print out python version for debugging
  - pip install -r requirements.txt

variables:
  SECRET_KEY: "Testing.Secret.Key"

test:
  script:
  - python manage.py test

How can I also have it build the docker image? Most .yml files I see for CI/CD that build Docker images use the docker “docker” image, which as far as I can tell does not have python. Any assistance would be great.