1 # Use imutable image tags rather than mutable tags (like ubuntu:20.04)
2 FROM ubuntu:focal-20220531
6 RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
10 libssl-dev python3-dev sshpass apt-transport-https jq moreutils \
11 ca-certificates curl gnupg2 software-properties-common python3-pip unzip rsync git \
12 && rm -rf /var/lib/apt/lists/*
13 RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \
14 && add-apt-repository \
15 "deb [arch=$ARCH] https://download.docker.com/linux/ubuntu \
18 && apt update -y && apt-get install --no-install-recommends -y docker-ce \
19 && rm -rf /var/lib/apt/lists/*
21 # Some tools like yamllint need this
22 # Pip needs this as well at the moment to install ansible
23 # (and potentially other packages)
24 # See: https://github.com/pypa/pip/issues/10219
29 RUN /usr/bin/python3 -m pip install --no-cache-dir pip -U \
30 && /usr/bin/python3 -m pip install --no-cache-dir -r tests/requirements.txt \
31 && python3 -m pip install --no-cache-dir -r requirements.txt \
32 && update-alternatives --install /usr/bin/python python /usr/bin/python3 1
34 RUN KUBE_VERSION=$(sed -n 's/^kube_version: //p' roles/kubespray-defaults/defaults/main.yaml) \
35 && curl -LO https://storage.googleapis.com/kubernetes-release/release/$KUBE_VERSION/bin/linux/$ARCH/kubectl \
36 && chmod a+x kubectl \
37 && mv kubectl /usr/local/bin/kubectl
39 RUN chmod a+x scripts/deploy.sh