Добавлены версионные образы ОС и обновлены конфигурации
- Переименованы: ubuntu -> ubuntu22, centos -> centos9 - Добавлены новые версии: ubuntu20, ubuntu24, centos7, centos8 - Добавлены версии Debian: debian9, debian10, debian11, debian12 - Обновлен Makefile с новыми образами - Обновлен preset all-images.yml с новыми версиями
This commit is contained in:
4
Makefile
4
Makefile
@@ -31,14 +31,14 @@ CONTAINER_NAME ?= ansible-controller
|
|||||||
# Переменные для Docker Hub
|
# Переменные для Docker Hub
|
||||||
DOCKER_REGISTRY ?= inecs/ansible-lab
|
DOCKER_REGISTRY ?= inecs/ansible-lab
|
||||||
DOCKER_VERSION ?= latest
|
DOCKER_VERSION ?= latest
|
||||||
DOCKER_IMAGES := ansible-controller alt-linux astra-linux redos rhel centos alma rocky ubuntu debian
|
DOCKER_IMAGES := ansible-controller alt-linux astra-linux redos rhel centos7 centos8 centos9 alma rocky ubuntu20 ubuntu22 ubuntu24 debian9 debian10 debian11 debian12
|
||||||
|
|
||||||
# Multi-arch поддержка
|
# Multi-arch поддержка
|
||||||
DOCKER_PLATFORMS ?= linux/amd64,linux/arm64
|
DOCKER_PLATFORMS ?= linux/amd64,linux/arm64
|
||||||
DOCKER_BUILDX_BUILDER ?= multiarch-builder
|
DOCKER_BUILDX_BUILDER ?= multiarch-builder
|
||||||
|
|
||||||
# Базовые образы и их теги
|
# Базовые образы и их теги
|
||||||
BASE_IMAGES := altlinux/p9 astralinux/astra-1.7 redos/redos:9 registry.access.redhat.com/ubi8/ubi quay.io/centos/centos:stream9 almalinux:8 rockylinux:8
|
BASE_IMAGES := altlinux/p9 astralinux/astra-1.7 redos/redos:9 registry.access.redhat.com/ubi8/ubi centos:7 quay.io/centos/centos:8 quay.io/centos/centos:stream9 almalinux:8 rockylinux:8 ubuntu:20.04 ubuntu:22.04 ubuntu:24.04 debian:9 debian:10 debian:11 debian:bookworm
|
||||||
|
|
||||||
.PHONY: role vault git docker presets controller help update-playbooks generate-docs setup-cicd list create delete
|
.PHONY: role vault git docker presets controller help update-playbooks generate-docs setup-cicd list create delete
|
||||||
|
|
||||||
|
|||||||
46
dockerfiles/centos7/Dockerfile
Normal file
46
dockerfiles/centos7/Dockerfile
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
# CentOS 7 с systemd
|
||||||
|
# Автор: Сергей Антропов
|
||||||
|
# Сайт: https://devops.org.ru
|
||||||
|
|
||||||
|
FROM centos:7
|
||||||
|
|
||||||
|
# Обновляем систему
|
||||||
|
RUN yum update -y && yum upgrade -y
|
||||||
|
|
||||||
|
# Устанавливаем systemd и необходимые пакеты
|
||||||
|
RUN yum install -y \
|
||||||
|
systemd \
|
||||||
|
systemd-sysv \
|
||||||
|
dbus \
|
||||||
|
curl \
|
||||||
|
wget \
|
||||||
|
nano \
|
||||||
|
python3 \
|
||||||
|
python3-pip \
|
||||||
|
sudo \
|
||||||
|
&& yum clean all
|
||||||
|
|
||||||
|
# Устанавливаем yq
|
||||||
|
# RUN wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_arm64 \
|
||||||
|
# && chmod +x /usr/local/bin/yq
|
||||||
|
|
||||||
|
# Устанавливаем Docker
|
||||||
|
# RUN curl -fsSL https://get.docker.com | sh
|
||||||
|
|
||||||
|
# Устанавливаем Docker Compose
|
||||||
|
# RUN curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose \
|
||||||
|
# && chmod +x /usr/local/bin/docker-compose
|
||||||
|
|
||||||
|
# Настраиваем systemd
|
||||||
|
RUN systemctl set-default multi-user.target
|
||||||
|
|
||||||
|
# Настраиваем sudoers для root и пользователей
|
||||||
|
RUN echo "root ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && \
|
||||||
|
echo "ALL ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/ansible-test
|
||||||
|
|
||||||
|
# Создаем пользователя для Ansible
|
||||||
|
RUN useradd -m -s /bin/bash ansible \
|
||||||
|
&& echo "ansible ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
||||||
|
|
||||||
|
# Команда по умолчанию (система запускается от root для systemd)
|
||||||
|
CMD ["/sbin/init"]
|
||||||
46
dockerfiles/centos8/Dockerfile
Normal file
46
dockerfiles/centos8/Dockerfile
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
# CentOS 8 с systemd
|
||||||
|
# Автор: Сергей Антропов
|
||||||
|
# Сайт: https://devops.org.ru
|
||||||
|
|
||||||
|
FROM quay.io/centos/centos:8
|
||||||
|
|
||||||
|
# Обновляем систему
|
||||||
|
RUN dnf update -y && dnf upgrade -y
|
||||||
|
|
||||||
|
# Устанавливаем systemd и необходимые пакеты
|
||||||
|
RUN dnf install -y --allowerasing \
|
||||||
|
systemd \
|
||||||
|
systemd-sysv \
|
||||||
|
dbus \
|
||||||
|
curl \
|
||||||
|
wget \
|
||||||
|
nano \
|
||||||
|
python3 \
|
||||||
|
python3-pip \
|
||||||
|
sudo \
|
||||||
|
&& dnf clean all
|
||||||
|
|
||||||
|
# Устанавливаем yq
|
||||||
|
# RUN wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_arm64 \
|
||||||
|
# && chmod +x /usr/local/bin/yq
|
||||||
|
|
||||||
|
# Устанавливаем Docker
|
||||||
|
# RUN curl -fsSL https://get.docker.com | sh
|
||||||
|
|
||||||
|
# Устанавливаем Docker Compose
|
||||||
|
# RUN curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose \
|
||||||
|
# && chmod +x /usr/local/bin/docker-compose
|
||||||
|
|
||||||
|
# Настраиваем systemd
|
||||||
|
RUN systemctl set-default multi-user.target
|
||||||
|
|
||||||
|
# Настраиваем sudoers для root и пользователей
|
||||||
|
RUN echo "root ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && \
|
||||||
|
echo "ALL ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/ansible-test
|
||||||
|
|
||||||
|
# Создаем пользователя для Ansible
|
||||||
|
RUN useradd -m -s /bin/bash ansible \
|
||||||
|
&& echo "ansible ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
||||||
|
|
||||||
|
# Команда по умолчанию (система запускается от root для systemd)
|
||||||
|
CMD ["/sbin/init"]
|
||||||
52
dockerfiles/debian10/Dockerfile
Normal file
52
dockerfiles/debian10/Dockerfile
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
# Debian 10 Buster с systemd
|
||||||
|
# Автор: Сергей Антропов
|
||||||
|
# Сайт: https://devops.org.ru
|
||||||
|
|
||||||
|
FROM debian:10
|
||||||
|
|
||||||
|
# Обновляем систему
|
||||||
|
RUN apt-get update && apt-get dist-upgrade -y
|
||||||
|
|
||||||
|
# Устанавливаем systemd и необходимые пакеты
|
||||||
|
RUN apt-get install -y \
|
||||||
|
systemd \
|
||||||
|
systemd-sysv \
|
||||||
|
dbus \
|
||||||
|
curl \
|
||||||
|
wget \
|
||||||
|
nano \
|
||||||
|
python3 \
|
||||||
|
python3-pip \
|
||||||
|
sudo \
|
||||||
|
&& apt-get clean
|
||||||
|
|
||||||
|
# Устанавливаем Docker вручную для Debian
|
||||||
|
# RUN apt-get update && apt-get install -y \
|
||||||
|
# ca-certificates \
|
||||||
|
# curl \
|
||||||
|
# gnupg \
|
||||||
|
# lsb-release \
|
||||||
|
# && mkdir -p /usr/share/keyrings \
|
||||||
|
# && curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg \
|
||||||
|
# && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian bookworm stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null \
|
||||||
|
# && apt-get update \
|
||||||
|
# && apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin \
|
||||||
|
# && apt-get clean
|
||||||
|
|
||||||
|
# Устанавливаем Docker Compose
|
||||||
|
# RUN curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose \
|
||||||
|
# && chmod +x /usr/local/bin/docker-compose
|
||||||
|
|
||||||
|
# Настраиваем systemd
|
||||||
|
RUN systemctl set-default multi-user.target
|
||||||
|
|
||||||
|
# Настраиваем sudoers для root и пользователей
|
||||||
|
RUN echo "root ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && \
|
||||||
|
echo "ALL ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/ansible-test
|
||||||
|
|
||||||
|
# Создаем пользователя для Ansible
|
||||||
|
RUN useradd -m -s /bin/bash ansible \
|
||||||
|
&& echo "ansible ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
||||||
|
|
||||||
|
# Команда по умолчанию (система запускается от root для systemd)
|
||||||
|
CMD ["/sbin/init"]
|
||||||
52
dockerfiles/debian11/Dockerfile
Normal file
52
dockerfiles/debian11/Dockerfile
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
# Debian 11 Bullseye с systemd
|
||||||
|
# Автор: Сергей Антропов
|
||||||
|
# Сайт: https://devops.org.ru
|
||||||
|
|
||||||
|
FROM debian:11
|
||||||
|
|
||||||
|
# Обновляем систему
|
||||||
|
RUN apt-get update && apt-get dist-upgrade -y
|
||||||
|
|
||||||
|
# Устанавливаем systemd и необходимые пакеты
|
||||||
|
RUN apt-get install -y \
|
||||||
|
systemd \
|
||||||
|
systemd-sysv \
|
||||||
|
dbus \
|
||||||
|
curl \
|
||||||
|
wget \
|
||||||
|
nano \
|
||||||
|
python3 \
|
||||||
|
python3-pip \
|
||||||
|
sudo \
|
||||||
|
&& apt-get clean
|
||||||
|
|
||||||
|
# Устанавливаем Docker вручную для Debian
|
||||||
|
# RUN apt-get update && apt-get install -y \
|
||||||
|
# ca-certificates \
|
||||||
|
# curl \
|
||||||
|
# gnupg \
|
||||||
|
# lsb-release \
|
||||||
|
# && mkdir -p /usr/share/keyrings \
|
||||||
|
# && curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg \
|
||||||
|
# && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian bookworm stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null \
|
||||||
|
# && apt-get update \
|
||||||
|
# && apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin \
|
||||||
|
# && apt-get clean
|
||||||
|
|
||||||
|
# Устанавливаем Docker Compose
|
||||||
|
# RUN curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose \
|
||||||
|
# && chmod +x /usr/local/bin/docker-compose
|
||||||
|
|
||||||
|
# Настраиваем systemd
|
||||||
|
RUN systemctl set-default multi-user.target
|
||||||
|
|
||||||
|
# Настраиваем sudoers для root и пользователей
|
||||||
|
RUN echo "root ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && \
|
||||||
|
echo "ALL ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/ansible-test
|
||||||
|
|
||||||
|
# Создаем пользователя для Ansible
|
||||||
|
RUN useradd -m -s /bin/bash ansible \
|
||||||
|
&& echo "ansible ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
||||||
|
|
||||||
|
# Команда по умолчанию (система запускается от root для systemd)
|
||||||
|
CMD ["/sbin/init"]
|
||||||
52
dockerfiles/debian12/Dockerfile
Normal file
52
dockerfiles/debian12/Dockerfile
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
# Debian 12 Bookworm с systemd
|
||||||
|
# Автор: Сергей Антропов
|
||||||
|
# Сайт: https://devops.org.ru
|
||||||
|
|
||||||
|
FROM debian:bookworm
|
||||||
|
|
||||||
|
# Обновляем систему
|
||||||
|
RUN apt-get update && apt-get dist-upgrade -y
|
||||||
|
|
||||||
|
# Устанавливаем systemd и необходимые пакеты
|
||||||
|
RUN apt-get install -y \
|
||||||
|
systemd \
|
||||||
|
systemd-sysv \
|
||||||
|
dbus \
|
||||||
|
curl \
|
||||||
|
wget \
|
||||||
|
nano \
|
||||||
|
python3 \
|
||||||
|
python3-pip \
|
||||||
|
sudo \
|
||||||
|
&& apt-get clean
|
||||||
|
|
||||||
|
# Устанавливаем Docker вручную для Debian
|
||||||
|
# RUN apt-get update && apt-get install -y \
|
||||||
|
# ca-certificates \
|
||||||
|
# curl \
|
||||||
|
# gnupg \
|
||||||
|
# lsb-release \
|
||||||
|
# && mkdir -p /usr/share/keyrings \
|
||||||
|
# && curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg \
|
||||||
|
# && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian bookworm stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null \
|
||||||
|
# && apt-get update \
|
||||||
|
# && apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin \
|
||||||
|
# && apt-get clean
|
||||||
|
|
||||||
|
# Устанавливаем Docker Compose
|
||||||
|
# RUN curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose \
|
||||||
|
# && chmod +x /usr/local/bin/docker-compose
|
||||||
|
|
||||||
|
# Настраиваем systemd
|
||||||
|
RUN systemctl set-default multi-user.target
|
||||||
|
|
||||||
|
# Настраиваем sudoers для root и пользователей
|
||||||
|
RUN echo "root ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && \
|
||||||
|
echo "ALL ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/ansible-test
|
||||||
|
|
||||||
|
# Создаем пользователя для Ansible
|
||||||
|
RUN useradd -m -s /bin/bash ansible \
|
||||||
|
&& echo "ansible ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
||||||
|
|
||||||
|
# Команда по умолчанию (система запускается от root для systemd)
|
||||||
|
CMD ["/sbin/init"]
|
||||||
52
dockerfiles/debian9/Dockerfile
Normal file
52
dockerfiles/debian9/Dockerfile
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
# Debian 9 Stretch с systemd
|
||||||
|
# Автор: Сергей Антропов
|
||||||
|
# Сайт: https://devops.org.ru
|
||||||
|
|
||||||
|
FROM debian:9
|
||||||
|
|
||||||
|
# Обновляем систему
|
||||||
|
RUN apt-get update && apt-get dist-upgrade -y
|
||||||
|
|
||||||
|
# Устанавливаем systemd и необходимые пакеты
|
||||||
|
RUN apt-get install -y \
|
||||||
|
systemd \
|
||||||
|
systemd-sysv \
|
||||||
|
dbus \
|
||||||
|
curl \
|
||||||
|
wget \
|
||||||
|
nano \
|
||||||
|
python3 \
|
||||||
|
python3-pip \
|
||||||
|
sudo \
|
||||||
|
&& apt-get clean
|
||||||
|
|
||||||
|
# Устанавливаем Docker вручную для Debian
|
||||||
|
# RUN apt-get update && apt-get install -y \
|
||||||
|
# ca-certificates \
|
||||||
|
# curl \
|
||||||
|
# gnupg \
|
||||||
|
# lsb-release \
|
||||||
|
# && mkdir -p /usr/share/keyrings \
|
||||||
|
# && curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg \
|
||||||
|
# && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian bookworm stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null \
|
||||||
|
# && apt-get update \
|
||||||
|
# && apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin \
|
||||||
|
# && apt-get clean
|
||||||
|
|
||||||
|
# Устанавливаем Docker Compose
|
||||||
|
# RUN curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose \
|
||||||
|
# && chmod +x /usr/local/bin/docker-compose
|
||||||
|
|
||||||
|
# Настраиваем systemd
|
||||||
|
RUN systemctl set-default multi-user.target
|
||||||
|
|
||||||
|
# Настраиваем sudoers для root и пользователей
|
||||||
|
RUN echo "root ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && \
|
||||||
|
echo "ALL ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/ansible-test
|
||||||
|
|
||||||
|
# Создаем пользователя для Ansible
|
||||||
|
RUN useradd -m -s /bin/bash ansible \
|
||||||
|
&& echo "ansible ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
||||||
|
|
||||||
|
# Команда по умолчанию (система запускается от root для systemd)
|
||||||
|
CMD ["/sbin/init"]
|
||||||
52
dockerfiles/ubuntu20/Dockerfile
Normal file
52
dockerfiles/ubuntu20/Dockerfile
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
# Ubuntu 20.04 с systemd
|
||||||
|
# Автор: Сергей Антропов
|
||||||
|
# Сайт: https://devops.org.ru
|
||||||
|
|
||||||
|
FROM ubuntu:20.04
|
||||||
|
|
||||||
|
# Обновляем систему
|
||||||
|
RUN apt-get update && apt-get dist-upgrade -y
|
||||||
|
|
||||||
|
# Устанавливаем systemd и необходимые пакеты
|
||||||
|
RUN apt-get install -y \
|
||||||
|
systemd \
|
||||||
|
systemd-sysv \
|
||||||
|
dbus \
|
||||||
|
curl \
|
||||||
|
wget \
|
||||||
|
nano \
|
||||||
|
python3 \
|
||||||
|
python3-pip \
|
||||||
|
sudo \
|
||||||
|
&& apt-get clean
|
||||||
|
|
||||||
|
# Устанавливаем Docker вручную для Ubuntu
|
||||||
|
# RUN apt-get update && apt-get install -y \
|
||||||
|
# ca-certificates \
|
||||||
|
# curl \
|
||||||
|
# gnupg \
|
||||||
|
# lsb-release \
|
||||||
|
# && mkdir -p /usr/share/keyrings \
|
||||||
|
# && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg \
|
||||||
|
# && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu jammy stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null \
|
||||||
|
# && apt-get update \
|
||||||
|
# && apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin \
|
||||||
|
# && apt-get clean
|
||||||
|
|
||||||
|
# Устанавливаем Docker Compose
|
||||||
|
# RUN curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose \
|
||||||
|
# && chmod +x /usr/local/bin/docker-compose
|
||||||
|
|
||||||
|
# Настраиваем systemd
|
||||||
|
RUN systemctl set-default multi-user.target
|
||||||
|
|
||||||
|
# Настраиваем sudoers для root и пользователей
|
||||||
|
RUN echo "root ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && \
|
||||||
|
echo "ALL ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/ansible-test
|
||||||
|
|
||||||
|
# Создаем пользователя для Ansible
|
||||||
|
RUN useradd -m -s /bin/bash ansible \
|
||||||
|
&& echo "ansible ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
||||||
|
|
||||||
|
# Команда по умолчанию (система запускается от root для systemd)
|
||||||
|
CMD ["/sbin/init"]
|
||||||
52
dockerfiles/ubuntu24/Dockerfile
Normal file
52
dockerfiles/ubuntu24/Dockerfile
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
# Ubuntu 24.04 с systemd
|
||||||
|
# Автор: Сергей Антропов
|
||||||
|
# Сайт: https://devops.org.ru
|
||||||
|
|
||||||
|
FROM ubuntu:24.04
|
||||||
|
|
||||||
|
# Обновляем систему
|
||||||
|
RUN apt-get update && apt-get dist-upgrade -y
|
||||||
|
|
||||||
|
# Устанавливаем systemd и необходимые пакеты
|
||||||
|
RUN apt-get install -y \
|
||||||
|
systemd \
|
||||||
|
systemd-sysv \
|
||||||
|
dbus \
|
||||||
|
curl \
|
||||||
|
wget \
|
||||||
|
nano \
|
||||||
|
python3 \
|
||||||
|
python3-pip \
|
||||||
|
sudo \
|
||||||
|
&& apt-get clean
|
||||||
|
|
||||||
|
# Устанавливаем Docker вручную для Ubuntu
|
||||||
|
# RUN apt-get update && apt-get install -y \
|
||||||
|
# ca-certificates \
|
||||||
|
# curl \
|
||||||
|
# gnupg \
|
||||||
|
# lsb-release \
|
||||||
|
# && mkdir -p /usr/share/keyrings \
|
||||||
|
# && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg \
|
||||||
|
# && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu jammy stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null \
|
||||||
|
# && apt-get update \
|
||||||
|
# && apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin \
|
||||||
|
# && apt-get clean
|
||||||
|
|
||||||
|
# Устанавливаем Docker Compose
|
||||||
|
# RUN curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose \
|
||||||
|
# && chmod +x /usr/local/bin/docker-compose
|
||||||
|
|
||||||
|
# Настраиваем systemd
|
||||||
|
RUN systemctl set-default multi-user.target
|
||||||
|
|
||||||
|
# Настраиваем sudoers для root и пользователей
|
||||||
|
RUN echo "root ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && \
|
||||||
|
echo "ALL ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/ansible-test
|
||||||
|
|
||||||
|
# Создаем пользователя для Ansible
|
||||||
|
RUN useradd -m -s /bin/bash ansible \
|
||||||
|
&& echo "ansible ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
||||||
|
|
||||||
|
# Команда по умолчанию (система запускается от root для systemd)
|
||||||
|
CMD ["/sbin/init"]
|
||||||
@@ -12,12 +12,19 @@ images:
|
|||||||
alt: "inecs/ansible-lab:alt-linux-latest"
|
alt: "inecs/ansible-lab:alt-linux-latest"
|
||||||
astra: "inecs/ansible-lab:astra-linux-latest"
|
astra: "inecs/ansible-lab:astra-linux-latest"
|
||||||
rhel: "inecs/ansible-lab:rhel-latest"
|
rhel: "inecs/ansible-lab:rhel-latest"
|
||||||
centos: "inecs/ansible-lab:centos-latest"
|
centos7: "inecs/ansible-lab:centos7-latest"
|
||||||
|
centos8: "inecs/ansible-lab:centos8-latest"
|
||||||
|
centos9: "inecs/ansible-lab:centos9-latest"
|
||||||
alma: "inecs/ansible-lab:alma-latest"
|
alma: "inecs/ansible-lab:alma-latest"
|
||||||
rocky: "inecs/ansible-lab:rocky-latest"
|
rocky: "inecs/ansible-lab:rocky-latest"
|
||||||
redos: "inecs/ansible-lab:redos-latest"
|
redos: "inecs/ansible-lab:redos-latest"
|
||||||
ubuntu: "inecs/ansible-lab:ubuntu-latest"
|
ubuntu20: "inecs/ansible-lab:ubuntu20-latest"
|
||||||
debian: "inecs/ansible-lab:debian-latest"
|
ubuntu22: "inecs/ansible-lab:ubuntu22-latest"
|
||||||
|
ubuntu24: "inecs/ansible-lab:ubuntu24-latest"
|
||||||
|
debian9: "inecs/ansible-lab:debian9-latest"
|
||||||
|
debian10: "inecs/ansible-lab:debian10-latest"
|
||||||
|
debian11: "inecs/ansible-lab:debian11-latest"
|
||||||
|
debian12: "inecs/ansible-lab:debian12-latest"
|
||||||
|
|
||||||
systemd_defaults:
|
systemd_defaults:
|
||||||
privileged: true
|
privileged: true
|
||||||
@@ -29,22 +36,67 @@ systemd_defaults:
|
|||||||
|
|
||||||
hosts:
|
hosts:
|
||||||
# Debian-based системы
|
# Debian-based системы
|
||||||
- name: ubuntu-test
|
- name: ubuntu20-test
|
||||||
family: ubuntu
|
family: ubuntu20
|
||||||
groups: [test, debian]
|
groups: [test, debian, ubuntu]
|
||||||
publish:
|
publish:
|
||||||
- "8080:80"
|
- "8080:80"
|
||||||
env:
|
env:
|
||||||
TEST_OS: "Ubuntu"
|
TEST_OS: "Ubuntu 20.04"
|
||||||
TEST_FAMILY: "Debian"
|
TEST_FAMILY: "Debian"
|
||||||
|
|
||||||
- name: debian-test
|
- name: ubuntu22-test
|
||||||
family: debian
|
family: ubuntu22
|
||||||
groups: [test, debian]
|
groups: [test, debian, ubuntu]
|
||||||
publish:
|
publish:
|
||||||
- "8081:80"
|
- "8081:80"
|
||||||
env:
|
env:
|
||||||
TEST_OS: "Debian"
|
TEST_OS: "Ubuntu 22.04"
|
||||||
|
TEST_FAMILY: "Debian"
|
||||||
|
|
||||||
|
- name: ubuntu24-test
|
||||||
|
family: ubuntu24
|
||||||
|
groups: [test, debian, ubuntu]
|
||||||
|
publish:
|
||||||
|
- "8082:80"
|
||||||
|
env:
|
||||||
|
TEST_OS: "Ubuntu 24.04"
|
||||||
|
TEST_FAMILY: "Debian"
|
||||||
|
|
||||||
|
- name: debian9-test
|
||||||
|
family: debian9
|
||||||
|
groups: [test, debian]
|
||||||
|
publish:
|
||||||
|
- "8083:80"
|
||||||
|
env:
|
||||||
|
TEST_OS: "Debian 9"
|
||||||
|
TEST_FAMILY: "Debian"
|
||||||
|
|
||||||
|
- name: debian10-test
|
||||||
|
family: debian10
|
||||||
|
groups: [test, debian]
|
||||||
|
publish:
|
||||||
|
- "8084:80"
|
||||||
|
env:
|
||||||
|
TEST_OS: "Debian 10"
|
||||||
|
TEST_FAMILY: "Debian"
|
||||||
|
|
||||||
|
- name: debian11-test
|
||||||
|
family: debian11
|
||||||
|
groups: [test, debian]
|
||||||
|
publish:
|
||||||
|
- "8085:80"
|
||||||
|
env:
|
||||||
|
TEST_OS: "Debian 11"
|
||||||
|
TEST_FAMILY: "Debian"
|
||||||
|
|
||||||
|
- name: debian12-test
|
||||||
|
family: debian12
|
||||||
|
groups: [test, debian]
|
||||||
|
publish:
|
||||||
|
- "8086:80"
|
||||||
|
env:
|
||||||
|
TEST_OS: "Debian 12"
|
||||||
TEST_FAMILY: "Debian"
|
TEST_FAMILY: "Debian"
|
||||||
|
|
||||||
- name: alt-test
|
- name: alt-test
|
||||||
@@ -67,13 +119,31 @@ hosts:
|
|||||||
TEST_FAMILY: "Astra Linux"
|
TEST_FAMILY: "Astra Linux"
|
||||||
|
|
||||||
# RHEL-based системы
|
# RHEL-based системы
|
||||||
- name: centos-test
|
- name: centos7-test
|
||||||
family: centos
|
family: centos7
|
||||||
groups: [test, rhel]
|
groups: [test, rhel, centos]
|
||||||
publish:
|
publish:
|
||||||
- "8084:80"
|
- "8090:80"
|
||||||
env:
|
env:
|
||||||
TEST_OS: "CentOS"
|
TEST_OS: "CentOS 7"
|
||||||
|
TEST_FAMILY: "RedHat"
|
||||||
|
|
||||||
|
- name: centos8-test
|
||||||
|
family: centos8
|
||||||
|
groups: [test, rhel, centos]
|
||||||
|
publish:
|
||||||
|
- "8091:80"
|
||||||
|
env:
|
||||||
|
TEST_OS: "CentOS 8"
|
||||||
|
TEST_FAMILY: "RedHat"
|
||||||
|
|
||||||
|
- name: centos9-test
|
||||||
|
family: centos9
|
||||||
|
groups: [test, rhel, centos]
|
||||||
|
publish:
|
||||||
|
- "8092:80"
|
||||||
|
env:
|
||||||
|
TEST_OS: "CentOS 9"
|
||||||
TEST_FAMILY: "RedHat"
|
TEST_FAMILY: "RedHat"
|
||||||
|
|
||||||
- name: rhel-test
|
- name: rhel-test
|
||||||
|
|||||||
Reference in New Issue
Block a user