Publishing your Docker Images to Bintray

Hemanth Sridhar
2 min readMar 23, 2020

JFrog Bintray is a cloud platform that gives you full control over how you publish, store, promote, and distribute software.

In this article, I will be creating a custom image installing node, chrome browser and Lighthouse CI with Ubuntu as the base image and uploading it to Bintray.

If you know how to create a docker image, skip to SECTION 2.

SECTION 1

CREATE A CUSTOM DOCKER IMAGE

Step 1 : Pull the latest Ubuntu image

docker pull ubuntu

Step 2 : Create a container named ubuntu-lhci and jump inside the container

docker run -it --name ubuntu-lhci ubuntu bash

Step 3: Install node, chrome browser and LHCI inside the container.

Step 4: Save the container using the docker commit command

docker commit ubuntu-lhci

Step 5: Check if a new image is created

docker images

You will notice that there will be an image created with repository and tag <none>

Step 6: Tag the image

docker tag c76c0861903f lhci-in-ubuntu

Step 7: Check if a new image is created with the name lhci-in-ubuntu

docker images

SECTION 2

PUSHING THE DOCKER IMAGE TO BINTRAY

Step 1: Create a docker repository in Bintray. I will name it, dockerlibs

Step 2: Create a package under the repository. I will name it, lhci-ubuntu

Step 3: Create a version under the package. I will name it 1.0

Step 4: Navigate to ‘UPLOADING’ section under ‘SET ME UP

Step 6: Docker Login to Bintray repository

docker login -u <username> -p <API_KEY> hemanthtest-docker-dockerlibs.bintray.io

The API_KEY can be obtained in Edit Profile page.

Step 7: Docker tag

docker tag <IMAGE_ID> hemanthtest-docker-dockerlibs.bintray.io/lhci-ubuntu:1.0

Step 8: Docker push

docker push hemanthtest-docker-dockerlibs.bintray.io/lhci-ubuntu:1.0

--

--