Public | Automated Build

Last pushed: 3 months ago
Short Description
A lightweight Ubuntu 14.04 Trusty VM in Docker.
Full Description


A lightweight Ubuntu 14.04 Trusty VM in Docker. Based on geerlingguy/docker-ubuntu1404-ansible, do read
the author's excellent post about testing Ansible across multiple operating systems.

NOTE: When running this container as --privileged on a machine running SELinux in enforcing mode, the container
must remount /sys/fs/selinux in read-only mode because Ubuntu by default does not understand how to deal with an
SELinux system and SELinux packages/policy/tools would need to be installed in the image to make it work properly.
If this filesystem is not remounted read-only, dpkg and apt will crash, unable to read security contexts.

The problem with doing this on a --privileged container: if the host has SELinux mounted read-write, it too will
be remounted read only. After you have finished work with the container, please be sure to remount in read-write mode
on the host operating system.

Published to the Docker Hub as naftulikay/trusty-vm.


Ubuntu 14.04 requires no special privileges to run, as opposed some of the systemd containers:

docker run --detach naftulikay/trusty-vm:latest

The container ID will be emitted by Docker and this can be used to execute commands in the Docker container/"VM".

Testing Ansible Roles

To test Ansible roles, pass something of the following to mount your role and execute your tests against it:


When starting the container, a container ID is emitted; this can be saved and used to execute commands within the Docker

docker exec --tty $CONTAINER_ID env TERM=xterm ansible --version
docker exec --tty $CONTAINER_ID env TERM=xterm ansible-playbook /path/to/ansible/playbook.yml --syntax-check


This container must do the following:


  • :ballot_box_with_check: enable services to be started via the init manager using service $x start.


  • :ballot_box_with_check: /sys/fs/selinux, if present, will be remounted read-only to
    allow most programs to work.
Docker Pull Command
Source Repository