Using the Docker registry

Introduction

As well as storing Python packages, Packagr also lets you store Docker images securely. All Packagr accounts now get a private Docker registry URL. All of your team members have access to pull and push images from your repository.

Packagr uses Amazon S3 to store and backup your Docker images securely. Your Docker images will count towards your total Packagr storage allowance.

Using your registry

Authenticating

Go to https://app.packagr.app/account to get your unique Docker registry URL. You'll need to authenticate before you can either pull/push images to or from your registry with the docker login command:

docker login docker.packagr.app/my-hash-id -u my-packagr-account@email.com -p my-packagr-password

Building, tagging and uploading your image

Let's say you have a file called Dockerfile which looks like this

FROM alpine
CMD echo "Hello"

You can build your image with the following command:

docker build -t hello .

Before uploading it, you must tag it. Tags must be in the format {packagr-url}/{name}:{tag} or {packagr-url}/{name}/{component}:{tag}, for example:

docker tag hello docker.packagr.app/my-hash-id/app:latest

Once tagged, you can push your image to Packagr by pushing the tag:

docker push docker.packagr.app/my-hash-id/app:latest

Pulling docker images

Any images you've built can be pulled using the same tag:

docker pull docker.packagr.app/my-hash-id/app:latest