fix2
This commit is contained in:
54
Dockerfile
54
Dockerfile
@@ -1,18 +1,52 @@
|
||||
FROM python:3.9-slim
|
||||
# Use the official Python 3.12.9 Bullseye image as the base
|
||||
FROM python:3.12.9-bullseye
|
||||
|
||||
# Устанавливаем зависимости
|
||||
RUN apt-get update && apt-get install -y \
|
||||
# Set environment variables
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
|
||||
# Install system dependencies
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
git \
|
||||
curl \
|
||||
docker.io \
|
||||
docker-compose \
|
||||
ssh \
|
||||
gcc \
|
||||
libffi-dev \
|
||||
libssl-dev \
|
||||
make \
|
||||
sudo \
|
||||
sshpass \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN pip3 install --no-cache-dir ansible ansible-lint ansible-vault molecule docker molecule-docker
|
||||
# Install Docker CLI
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
curl \
|
||||
gnupg \
|
||||
lsb-release \
|
||||
&& mkdir -p /etc/apt/keyrings \
|
||||
&& curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg \
|
||||
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian bullseye stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null \
|
||||
&& apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
docker-ce-cli \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Устанавливаем Docker CLI
|
||||
RUN curl -fsSL https://get.docker.com | sh
|
||||
|
||||
# Install Python dependencies for Ansible and Molecule
|
||||
RUN pip install --upgrade pip && \
|
||||
pip install \
|
||||
ansible \
|
||||
ansible-lint \
|
||||
ansible-vault \
|
||||
molecule \
|
||||
molecule-docker \
|
||||
molecule-plugins ansible-compat \
|
||||
docker
|
||||
|
||||
|
||||
# Set the working directory
|
||||
WORKDIR /ansible
|
||||
ENTRYPOINT ["/bin/bash"]
|
||||
|
||||
# Default command
|
||||
CMD ["/bin/bash"]
|
||||
Reference in New Issue
Block a user