Sign inSign up

buluma/docker-molecule-shell

By buluma

Updated 9 days ago

Molecule shell container for Ansible role testing.

Image
0

2.1K

buluma/docker-molecule-shell repository overview

Molecule Shell

A Shell Container to tests your Ansible role using Molecule.

Usage

Build the container

Clone the repository and build the container (needs docker installed)

git clone [email protected]:buluma/docker-molecule-shell.git
cd docker-molecule-shell/
docker build -t docker-molecule-shell:local -f Dockerfile .

Pull the container

docker pull ghcr.io/buluma/docker-molecule-shell:latest

Test ansible roles inside the container

Start the container

docker run -d --name docker-molecule-shell \
    --cap-add SYS_ADMIN \
    --privileged \
    --cgroupns=host \
    -v /sys/fs/cgroup:/sys/fs/cgroup:rw \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -v /PATH/TO/REPOSITORY/:/workspace \
    ghcr.io/buluma/docker-molecule-shell:latest /usr/sbin/init

docker exec -it docker-molecule-shell /bin/bash

Tag summary

Content type

Image

Digest

sha256:0f97bb647

Size

596.3 MB

Last updated

9 days ago

docker pull buluma/docker-molecule-shell