Files
DevOpsLab/Dockerfile-CentOS
Sergey Antropoff cbf79cc9b8 Добавить системные пакеты в образы Ubuntu и CentOS
- Добавлены системные пакеты в Dockerfile-Ubuntu:
  - git, ssh, gcc, libffi-dev, libssl-dev, make, sudo
  - sshpass, openssh-client, nano, less, ca-certificates
  - curl, gnupg, lsb-release
- Добавлены системные пакеты в Dockerfile-CentOS:
  - git, openssh, gcc, libffi-devel, openssl-devel, make, sudo
  - sshpass, openssh-clients, nano, less, ca-certificates
  - curl, gnupg2, redhat-lsb-core
- Добавлены Python пакеты для Ansible:
  - ansible, ansible-vault, molecule, molecule-docker
  - ansible-lint, yamllint, docker
- Образы теперь содержат все необходимые инструменты для тестирования Ansible ролей

Автор: Сергей Антропов
2025-10-21 00:01:55 +03:00

34 lines
1007 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Сборка контейнера с systemd для удобного тестирования ролей Ansible через Molecule
# Используем официальный образ Fedora
FROM quay.io/fedora/python-312
USER root
# Обновляем пакеты и устанавливаем systemd
RUN dnf -y update && \
dnf -y install systemd rsync && \
dnf clean all && \
rm -rf /var/cache/dnf /tmp/* /var/tmp/*
# Устанавливаем Python пакеты для Ansible
RUN pip install --upgrade pip && \
pip install \
ansible \
ansible-vault \
molecule \
molecule-docker \
ansible-lint \
yamllint \
docker \
&& rm -rf /root/.cache/pip
# Настраиваем окружение для systemd
ENV container=docker
STOPSIGNAL SIGRTMIN+3
# Создаем необходимые директории для systemd
VOLUME [ "/sys/fs/cgroup" ]
# Запускаем systemd при старте контейнера
CMD ["/sbin/init"]