Public | Automated Build

Last pushed: a year ago
Short Description
Docker image for Foreman Cloud monitoring tool
Full Description


Disclaimer: This is a fork of Dan McDougall's <> excellent Dockerfile <>_ and supporting
scripts for running Foreman <>_ inside a
Docker <>_ container. It is based on
phusion/baseimage <>_
which is a modified version of Docker's default 'ubuntu' image.

The image is configured to use the
'1.13' Ubuntu 16.06 Xenial repository <>_

This Docker image was created so that can happen :smile: . If I've made a horrible mistake somewere please
open an issue <>_.


It is recommended that to build this Docker image like so::

docker build -t foreman /path/to/docker-foreman/.

This will create a new docker image named "foreman" using the Dockerfile in
this repository. Replace /path/to/docker-foreman/. with the correct path on
your system.


It is recommended that you run the image like so::

docker run -t --hostname="" --name=foreman -p 8443:443 -p 8080:80 foreman

That will run the image in a new container with the hostname,
'' (replace with your own hostname) named, 'foreman' with
ports 80 and 443 inside the container exposed as ports 8080 and 8443,

The first time the container is run it will execute the <>_
script which calls foreman-installer --reset-foreman-db and
foreman-rake permissions:reset to reset the Foreman database and provide new
credentials for the 'admin' user. These credentials will be displayed so make
sure to take a note of them so you can login after it's done starting up.

NOTE: The script only runs
foreman-installer --reset-foreman-db once. If you docker commit the
container (say, after an apt-get update && apt-get upgrade) it will not
reset the database unless you remove the /etc/foreman/.first_run_completed

Known Issues

There's some (mostly minor) issues with the image...

SmartProxy Errors
I have not tested Foreman's SmartProxy in this image so I don't know if it
works. What I do know is that when you build the image foreman-installer
will output errors like this::

E, [2014-09-19T01:27:00.689495 #381] ERROR -- : ge: 365/366, 99%, 0.0/s, elapsed: 00:05:39
 /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[]: Failed to call refresh: Could not load data from
 /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[]: Could not load data from

I don't know what the consequences of that are are but I do believe it has
something to do with the fact that the hostname of the image isn't set to an
FQDN when the image is built. I'm hoping that by passing the --hostname=
option to docker run corrects the problem. Maybe someone that knows more
about Foreman can provide more detail (
open an issue <>_).


Install Plugins and Extra Tools
Use the docker-enter command (if you don't have it follow the instructions
here <>_) to enter the container then you
can install any of the packages/plugins in the official 'plugins' repository::

root@foreman:~# apt-cache search foreman
foremancli - commandline search interface to Foreman
foreman-assets - metapackage providing Rails asset dependencies for Foreman
foreman-cli - metapackage providing hammer CLI for Foreman
foreman-compute - metapackage providing fog dependencies for Foreman (for Amazon EC2 support)
foreman-console - metapackage providing console dependencies for Foreman
foreman-devel - metapackage providing development dependencies for Foreman
foreman-gce - metapackage providing GCE dependencies for Foreman
foreman-installer - Automated puppet-based installer for The Foreman
foreman-libvirt - metapackage providing libvirt dependencies for Foreman
foreman-mysql2 - metapackage providing mysql2 dependencies for Foreman
foreman-ovirt - metapackage providing ovirt dependencies for Foreman
foreman-postgresql - metapackage providing PostgreSQL dependencies for Foreman
foreman-proxy - RESTful proxies for DNS, DHCP, TFTP, and Puppet
foreman-sqlite3 - metapackage providing sqlite dependencies for Foreman
foreman-test - metapackage providing test dependencies for Foreman
foreman-vmware - metapackage providing vmware dependencies for Foreman
foreman - Systems management web interface
ruby-foreman-api - Ruby bindings for Foreman's rest API
ruby-hammer-cli-foreman-bootdisk - Foreman boot disk commands for Hammer CLI
ruby-hammer-cli-foreman - Foreman commands for Hammer
ruby-foreman-bootdisk - Foreman Bootdisk Plugin
ruby-foreman-chef - Foreman Chef Plugin
ruby-foreman-column-view - Foreman Column View Plugin
ruby-foreman-deface - Foreman Deface Plugin Dependency
ruby-foreman-default-hostgroup - Foreman Default Hostgroup Plugin
ruby-foreman-dhcp-browser - Foreman DHCP browser Plugin
ruby-foreman-discovery - Foreman Discovery Plugin
ruby-foreman-hooks - Foreman Hooks Plugin
ruby-foreman-salt - Foreman Salt Plugin
ruby-foreman-setup - Foreman Setup Plugin
ruby-foreman-snapshot - Foreman Snapshot Plugin
ruby-foreman-templates - Foreman Templates Plugin
ruby-puppetdb-foreman - Foreman Puppetdb Plugin
ruby-smart-proxy-salt - SaltStack Plug-In for Foreman's Smart Proxy

Example: apt-get install ruby-foreman-column-view


Docker Pull Command
Source Repository