0bf6ec34c2
v0.8.15 is no longer compatible with focal base. Remove bionic and add jammy dockerfile. Change-Id: Ib1dbd351730aa3632aed06d848458b8879bc2879
20 lines
849 B
Docker
20 lines
849 B
Docker
ARG FROM=docker.io/ubuntu:jammy
|
|
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}
|