Public | Automated Build

Last pushed: 8 months ago
Short Description
git://ci hawkbit image
Full Description

Run Hawkbit in a Docker Container

Build the Image

You might want to change some values from the default ones used in the configuration

Look at the file and change:

  • Default RabbitMQ username and password (spring.rabbitmq.username, spring.rabbitmq.password) (if different).
  • MariaDB URL, username and password (spring.datasource.url, spring.datasource.username, spring.datasource.password), and the name of the database used.
  • MongoDB URI (
  • The Hawkbit password and user (hawkbit.server.ui.demo.password, hawkbit.server.ui.demo.user).

The image can take a while to build.

docker build -t hawkbit --force-rm .

Run the Container

The container now needs three more containers to run:

Since the --link options is a deprecated legacy,
it is necessary to create a dedicated network where all the above containers,
plus the Hawkbit one, will run.

Create the hawkbit-net network:

docker network create hawkbit-net

Start a MariaDB container as explained in the offial container image documentation.

You need to specify the MYSQL_USER, MYSQL_PASSWORD, MYSQL_DATABASE values,
and those should be reflected in the file.

docker run -dit --network=hawkbit-net --name srv-mariadb -e MYSQL_ROOT_PASSWORD=ROOT_PASSWORD -e MYSQL_USER=USER_NAME -e MYSQL_PASSWORD=USER_PASSWORD -e MYSQL_DATABASE=DB_NAME mariadb

Note that the default database name, the value for the MYSQL_DATABASE
variable, as defined in the hawkbit container is hawkbit. This cannot be changed without rebuilding the hawkbit container.

Run rabbitmq and mongdb:

docker run -dit --network=hawkbit-net --name srv-mongodb mongo:3.2
docker run -dit --network=hawkbit-net --name srv-rabbitmq --hostname srv-rabbitmq rabbitmq

When all the containers are up, start the Hawkbit one:

docker run -dit --network=hawkbit-net --name hawkbit -p 8080:8080 linaroproduct/ -v gitci-hawkbit-container

The file available in the repository is just an example:
it should match at least the values defined for the Mariadb container before.
The file has to be mounted at /srv/secrets/

If you prefer to use the --link mode to connect the various containers, remove
the --network argument from the commands above, and on the last one (the one
that runs Hawkbit) include:

--link srv-mariadb:srv-mariadb --link srv-mongodb:srv-mongodb --link srv-rabbitmq:srv-rabbitmq

Once the container is up and running and the application started (in can take
~40 seconds for the application to start the first time), head to http://localhost:8080/UI
and login with the Hawkbit username and password configured (by default admin/admin).

From here on:

Hic sunt dracones

Docker Pull Command

Comments (0)