Code Monkey home page Code Monkey logo

docker-ansible-images's Introduction

Docker Ansible Images

This repository contains a Dockerfile and necessary files to build a Docker image based on different operative systems that enables systemd service management, mounts the cgroup volume, and installs an Ansible inventory file.

Available Images

Name Docker Image Architecture
GitHub Workflow Status (with event) Docker Pulls amd64,arm64
GitHub Workflow Status (with event) Docker Pulls amd64,arm64
GitHub Workflow Status (with event) Docker Pulls amd64,arm64
GitHub Workflow Status (with event) Docker Pulls amd64,arm64
GitHub Workflow Status (with event) Docker Pulls amd64,arm64
GitHub Workflow Status (with event) Docker Pulls amd64,arm64
GitHub Workflow Status (with event) Docker Pulls amd64,arm64
GitHub Workflow Status (with event) Docker Pulls amd64,arm64
GitHub Workflow Status (with event) Docker Pulls amd64,arm64
GitHub Workflow Status (with event) Docker Pulls amd64,arm64

Features

  • Systemd Services: The Docker image allows you to manage systemd services inside the container, providing a more comprehensive environment for testing and development.

  • Cgroup Volume: The image mounts the cgroup volume from the host to the container, ensuring proper functioning of systemd and related services.

  • Ansible Inventory: An Ansible inventory file is installed within the container at /etc/ansible/hosts. This allows you to use Ansible for configuration management tasks.

How to Build the Docker Image

  1. Clone this repository to your local machine:
git clone https://github.com/iamenr0s/docker-ansible-images.git
  1. Ensure you have Docker installed on your system.

  2. Build the Docker image:

docker build -t docker-<DISTRO>-ansible -f <DISTRO>/Dockerfile .

How to Run the Docker Container

To run a container from the built Docker image, use the following command:

docker run -d --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro docker-<DISTRO>-ansible
  • The --privileged flag is required to run systemd inside the container.
  • The -v option mounts the host's cgroup volume to the container's cgroup directory.

Important Notes

  • Running systemd inside a Docker container is not a typical use case and may have security implications. It is generally recommended to use Docker for stateless services and consider alternative solutions like Kubernetes for managing stateful services with systemd requirements.

  • For more information about using this Docker image, refer to the Docker documentation.

Issues and Contributions

If you encounter any issues with this Docker image or have suggestions for improvements, please open an issue on the repository.

Contributions in the form of pull requests are also welcome. Feel free to contribute to making these Docker images better!

License

This project is licensed under the MIT License.

docker-ansible-images's People

Contributors

iamenr0s avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.