Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Docker Compose Environment
Important note: remember that this page refers to a development environment. For examples closer to production see this.
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.
- background: the background process performs some needed tasks for the maintenance of Portus.
- clair: a CoreOS Clair process that you can use to test the security vulnerability feature.
- postgres: the database for clair.
This environment is meant for development/playground purposes. Known limitations:
- Portus uses a public and password-less 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
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
- 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>:5000by default).
Portus' UI will be accessible on
Once the initial setup is done you can use
docker-compose to handle everything.
You can do:
docker-compose upto start the whole environment
docker-compose stopto stop the whole environment
All the changes (database, registry) are stored into Docker volumes.