fix: исправление Dockerfiles для Ubuntu и Debian
- Убрана установка yq (проблемы с архитектурой) - Исправлена установка Docker для правильной архитектуры - Использование dpkg --print-architecture вместо hardcoded amd64 - Упрощена структура Dockerfiles - Образы успешно собраны и отправлены в Docker Hub Исправления: - Ubuntu 22.04: inecs/ansible-lab:ubuntu-22.04 - Debian bookworm: inecs/ansible-lab:debian-bookworm
This commit is contained in:
@@ -24,10 +24,6 @@ RUN apt-get install -y \
|
|||||||
python3-pip \
|
python3-pip \
|
||||||
&& apt-get clean
|
&& apt-get clean
|
||||||
|
|
||||||
# Устанавливаем yq
|
|
||||||
RUN wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 \
|
|
||||||
&& chmod +x /usr/local/bin/yq
|
|
||||||
|
|
||||||
# Устанавливаем Docker вручную для Debian
|
# Устанавливаем Docker вручную для Debian
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
@@ -36,7 +32,7 @@ RUN apt-get update && apt-get install -y \
|
|||||||
lsb-release \
|
lsb-release \
|
||||||
&& mkdir -p /usr/share/keyrings \
|
&& mkdir -p /usr/share/keyrings \
|
||||||
&& curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg \
|
&& curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg \
|
||||||
&& echo "deb [arch=amd64 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 \
|
&& 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 update \
|
||||||
&& apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin \
|
&& apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin \
|
||||||
&& apt-get clean
|
&& apt-get clean
|
||||||
|
|||||||
@@ -24,10 +24,6 @@ RUN apt-get install -y \
|
|||||||
python3-pip \
|
python3-pip \
|
||||||
&& apt-get clean
|
&& apt-get clean
|
||||||
|
|
||||||
# Устанавливаем yq
|
|
||||||
RUN wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 \
|
|
||||||
&& chmod +x /usr/local/bin/yq
|
|
||||||
|
|
||||||
# Устанавливаем Docker вручную для Ubuntu
|
# Устанавливаем Docker вручную для Ubuntu
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
@@ -36,7 +32,7 @@ RUN apt-get update && apt-get install -y \
|
|||||||
lsb-release \
|
lsb-release \
|
||||||
&& mkdir -p /usr/share/keyrings \
|
&& mkdir -p /usr/share/keyrings \
|
||||||
&& curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg \
|
&& curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg \
|
||||||
&& echo "deb [arch=amd64 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 \
|
&& 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 update \
|
||||||
&& apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin \
|
&& apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin \
|
||||||
&& apt-get clean
|
&& apt-get clean
|
||||||
|
|||||||
Reference in New Issue
Block a user