openstack-helm-images/node-problem-detector/Dockerfile.ubuntu_bionic

20 lines
850 B
Docker

ARG FROM=docker.io/ubuntu:bionic
FROM ${FROM}
ARG NPD_VERSION="v0.8.15"
ARG NPD_SRC_URL="https://github.com/kubernetes/node-problem-detector/releases/download/${NPD_VERSION}"
RUN apt-get update ;\
apt-get upgrade -y ;\
apt-get install --no-install-recommends -y wget ca-certificates ;\
#Create a Temp dir to download and extract the package
TMP_DIR=$(mktemp --directory) ;\
wget -q ${NPD_SRC_URL}/node-problem-detector-${NPD_VERSION}-linux_amd64.tar.gz -O ${TMP_DIR}/node-problem-detector-${NPD_VERSION}.tar.gz ;\
mkdir -p /opt/node-problem-detector/ ;\
tar zxf ${TMP_DIR}/node-problem-detector-${NPD_VERSION}.tar.gz -C /opt/node-problem-detector ;\
#Cleanup the directories
apt-get autoremove --purge ca-certificates ;\
apt-get clean ;\
rm -rf /var/lib/apt/lists/* /root/.cache ;\
rm -rf ${TMP_DIR}