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

Docker Compose Environment

Flavio Castelli edited this page Oct 29, 2015 · 14 revisions

It is possible to use docker-compose to spin up a small development/demo environment. The environment consists of three Docker containers linked together:

  • web: this is the container running Portus. It's based on the official rails 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.

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.

Initial setup

First of all ensure you have docker-compose installed. Note that this setup is known to fail on NFS. Then do:

$ ./compose-setup.sh

This will:

  • Download the rails Docker image from the Docker Hub.
  • Build the portus_web Docker image.
  • Download the mariadb Docker image from the Docker Hub.
  • Start the portus_db container and link it against a running instance of the web container.
  • Download the registry Docker image from the Docker Hub
  • Start the portus_registry container and link it against a running instance of the web container.
  • Initialize Portus' database: database creation, run the migrations.

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.

The setup script will print all these informations on the console.

Portus' UI will be accessible on http://<docker host>:3000. The registry will be listening on `:5000.

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.

Demo

asciicast

Clone this wiki locally