Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Docker Compose Environment

Miquel Sabaté Solà edited this page Nov 23, 2017 · 14 revisions

It is possible to use docker-compose to spin up a small development/demo environment. For that, you need docker-compose 1.6 or later. The environment consists of some Docker containers linked together:

  • portus: this is the container running Portus. It's based on the official opensuse/ruby Docker image.
  • db: this is the container running the database required by Portus. It's based on the official mariadb Docker image.
  • registry: this is a the container running the latest version of the Docker registry (aka distribution). It's based on the official registry Docker image.
  • webpack: a helper container that will set up the frontend environment automatically for you.
  • crono: the crono process that keeps the data stored in the registry and in Portus' DB in sync.

This environment is meant for development/playground purposes. Known limitations:

  • Portus uses a public and passwordless certificate stored inside of this git repository.
  • Registry is not secured, everything is transmitted over http.
  • The Docker host has two open two ports in order to make Portus and the registry reachable.

If you want a more secure and production-ready example using docker-compose, check the example in examples/compose.

Initial setup

First of all ensure you have docker-compose installed. Note that this setup is known to fail on NFS. Then, make sure that the environment variables as defined in .env are what you desire. After that, simply run:

$ docker-compose up

This will:

  • Download the needed Docker images.
  • Build the local images for development purpose.
  • Initialize the DB

Once the setup is done there are a couple of manual operations to perform on Portus:

  • Create your account. The first user is going to be an administrators. Administrators are special users, they can do everything, including pushing to the global namespace of your registry.
  • Associate your on-premise instance of the Docker registry (e.g. with this setup you will get <docker host>:5000 by default).

Portus' UI will be accessible on http://<docker host>:3000.

Normal usage

Once the initial setup is done you can use docker-compose to handle everything.

You can do:

  • docker-compose up to start the whole environment
  • docker-compose stop to stop the whole environment

All the changes (database, registry) are stored into Docker volumes.

Clone this wiki locally