42
dockerfile
42
dockerfile
@ -1,8 +1,29 @@
|
||||
ARG release_name=bookworm
|
||||
|
||||
FROM --platform=$TARGETPLATFORM quay.io/ansible/receptor:v1.4.4 as receptor
|
||||
|
||||
|
||||
FROM --platform=$TARGETPLATFORM python:3.11-slim-bookworm
|
||||
FROM --platform=$TARGETPLATFORM python:3.11-slim-${release_name} as prep
|
||||
|
||||
|
||||
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
|
||||
RUN apt update; \
|
||||
apt install -y \
|
||||
curl \
|
||||
gpg
|
||||
|
||||
|
||||
RUN curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | tee /usr/share/keyrings/helm.gpg > /dev/null; \
|
||||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/helm.gpg] https://baltocdn.com/helm/stable/debian/ all main" > /etc/apt/sources.list.d/helm.list; \
|
||||
cat /etc/apt/sources.list.d/helm.list;
|
||||
|
||||
|
||||
FROM --platform=$TARGETPLATFORM python:3.11-slim-${release_name}
|
||||
|
||||
|
||||
# Ansible chucks a wobbler without. see: https://github.com/ansible/ansible/issues/78283
|
||||
ENV LC_ALL en_US.UTF-8
|
||||
@ -40,19 +61,29 @@ RUN apt update \
|
||||
&& cp /tmp/deb/sbin/ldconfig /sbin/ \
|
||||
&& rm -Rf /tmp/deb \
|
||||
&& rm $(ls | grep libc-bin_ | grep -a '.deb') \
|
||||
&& apt-get install --reinstall \
|
||||
&& apt-get install -y --reinstall \
|
||||
libc-bin \
|
||||
# EoF fixing dpkg ldconfig not found error
|
||||
# Set Locale to en_US as ansible requires a locale for it to function without chucking a tantrum!!
|
||||
&& apt install -y \
|
||||
locales \
|
||||
apt-transport-https \
|
||||
&& sed -i 's/^# *\(en_US.UTF-8\)/\1/' /etc/locale.gen \
|
||||
&& locale-gen \
|
||||
&& apt list --upgradable \
|
||||
&& locale-gen;
|
||||
|
||||
|
||||
COPY --from=prep --chmod=644 /etc/apt/sources.list.d/helm.list /etc/apt/sources.list.d/helm.list
|
||||
|
||||
COPY --from=prep --chmod=644 /usr/share/keyrings/helm.gpg /usr/share/keyrings/helm.gpg
|
||||
|
||||
|
||||
RUN apt update; \
|
||||
apt list --upgradable \
|
||||
&& apt upgrade --no-install-recommends -y \
|
||||
&& apt-get install --no-install-recommends -y \
|
||||
openssh-client \
|
||||
git \
|
||||
helm \
|
||||
sshpass \
|
||||
postgresql-common \
|
||||
postgresql-client \
|
||||
@ -65,7 +96,8 @@ RUN apt update \
|
||||
# see issue https://gitlab.com/nofusscomputing/projects/ansible/execution_environment/-/issues/9 for following two lines
|
||||
&& apt remove -y \
|
||||
python3* \
|
||||
libpython3* \
|
||||
libpython3*; \
|
||||
helm plugin install https://github.com/databus23/helm-diff; \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
|
@ -11,6 +11,8 @@ PyMySQL==1.1.0
|
||||
# NetBox
|
||||
pytz==2024.1
|
||||
|
||||
PyYAML>=3.11
|
||||
|
||||
dnspython==2.4.2
|
||||
|
||||
xmltodict==0.13.0
|
||||
|
Reference in New Issue
Block a user