Creating the docker

I will first create a simple dockerfile with python 3.6 and pytest in order to have a ready docker to run some tests.

FROM python:3.6.6

RUN pip install pytest pytest-cov

Building my docker using:

docker build . -t python3-pytest

I can make sure it works as intended using:

docker run -t python3-pytest python -m pytest

Uploading to the registry

First let’s prepare the docker image using this command from how to push docker image to private repository. I want to upload it in my private artifactory registry at

docker tag python3-pytest

Before the upload I need to login using:

docker login

Then I just need to push it and it’s done:

docker push

Using a docker from that registry

Now that you have upload your image, let’s pull it to use it:

docker pull

# Run the docker with the -t to allocate a pseudo-TTY
docker run -t

And that’s it!