Public | Automated Build

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

docker-trusty-vm

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.

Running:

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:

--volume=$(pwd):/etc/ansible/roles/$ROLE_NAME:ro

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

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

Contracts

This container must do the following:

Services

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

Mounts

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

Comments (0)