Difficulty: Advanced
Estimated Time: 15-20 minutes

In this scenario you will learn how to use Gogs and Drone to create a CI/CD pipeline for building Docker Images.

Building Docker Images using Drone

Step 1 of 8

Configure Gogs

Gogs (https://gogs.io/) is a self-hosted Git Service. Drone (https://github.com/drone/drone), a Continuous Delivery platform. Together they can be used to build a CI/CD pipeline for building and deploying Docker Images.


The Docker Compose file has defined the Gogs and Drone configure. When deploying, the URL of the Drone service is required, in this case, the instance of the Katacoda environment.

To start the two services, run the docker-compose command below:

DRONE_HOST=https://[[HOST_SUBDOMAIN]]-80-[[KATACODA_HOST]].environments.katacoda.com docker-compose up -d

View the file using cat docker-compose.yml

After a few moments, the Gogs service will be available at https://[[HOST_SUBDOMAIN]]-3000-[[KATACODA_HOST]].environments.katacoda.com


The first task is to configure Gogs with the following settings. The username/password is defined in the Docker Compose file.

DB Type: Postgres

DB Host: postgres:5432

User: gogsuser

Password: gogspassword

Application URL: https://[[HOST_SUBDOMAIN]]-3000-[[KATACODA_HOST]].environments.katacoda.com

Under Admin Account Settings create a new user.

User: test

Password: test

Example: [email protected]

Once completed, click Install Gogs. Gogs is now setup and configured.