consilidating
This commit is contained in:
parent
5f57b1df08
commit
98a53af167
1 changed files with 37 additions and 115 deletions
|
|
@ -14,125 +14,47 @@ LABEL maintainer="Michael Trip"
|
||||||
WORKDIR /tmp
|
WORKDIR /tmp
|
||||||
# USER root
|
# USER root
|
||||||
# Download all packages and install everything in one layer
|
# Download all packages and install everything in one layer
|
||||||
# RUN \
|
RUN set -eux; \
|
||||||
# echo "**** Update package lists and install base tools ****" && \
|
echo "**** Update package lists and install base tools ****"; \
|
||||||
# DEBIAN_FRONTEND=noninteractive apt-get update && \
|
DEBIAN_FRONTEND=noninteractive apt-get update; \
|
||||||
# DEBIAN_FRONTEND=noninteractive apt-get install -y curl wget gnupg2 ca-certificates apt-transport-https && \
|
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends curl wget gnupg2 ca-certificates apt-transport-https software-properties-common; \
|
||||||
# echo "**** Download external packages ****" && \
|
echo "**** Determine download arch and download external packages ****"; \
|
||||||
# case ${TARGETARCH} in \
|
case "${TARGETARCH}" in \
|
||||||
# "amd64") DOWNLOAD_ARCH=linux-amd64 ;; \
|
amd64) DOWNLOAD_ARCH=linux-amd64 ;; \
|
||||||
# "arm64") DOWNLOAD_ARCH=linux-arm64 ;; \
|
arm64) DOWNLOAD_ARCH=linux-arm64 ;; \
|
||||||
# esac && \
|
|
||||||
# curl -L https://github.com/freelensapp/freelens/releases/download/v${FREELENS_VERSION}/Freelens-${FREELENS_VERSION}-${DOWNLOAD_ARCH}.deb -o /tmp/freelens.deb && \
|
|
||||||
# curl -L https://github.com/derailed/k9s/releases/download/v${K9S_VERSION}/k9s_Linux_${TARGETARCH}.tar.gz -o /tmp/k9s.tar.gz && \
|
|
||||||
# curl -L curl -LO https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/${TARGETARCH}/kubectl -o /usr/local/bin/kubectl && \
|
|
||||||
# chmod +x /usr/local/bin/kubectl && \
|
|
||||||
# curl -L https://get.helm.sh/helm-v${HELM_VERSION}-linux-${TARGETARCH}.tar.gz -o /tmp/helm.tar.gz && \
|
|
||||||
# curl -L https://github.com/kubernetes-sigs/headlamp/releases/download/v${HEADLAMP_VERSION}/headlamp_${HEADLAMP_VERSION}-1_${TARGETARCH}.deb -o /tmp/headlamp.deb && \
|
|
||||||
# echo "**** Setup VS Code repository ****" && \
|
|
||||||
# wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg && \
|
|
||||||
# cp packages.microsoft.gpg /etc/apt/keyrings && \
|
|
||||||
# echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list && \
|
|
||||||
# add-apt-repository ppa:xtradeb/apps -y && \
|
|
||||||
# apt-get update && \
|
|
||||||
# echo "**** Install all packages ****" && \
|
|
||||||
# mkdir -p /usr/share/man/man1 && \
|
|
||||||
# DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
|
||||||
# vim \
|
|
||||||
# neofetch \
|
|
||||||
# pluma \
|
|
||||||
# chromium \
|
|
||||||
# tilix \
|
|
||||||
# xdg-utils \
|
|
||||||
# man-db \
|
|
||||||
# default-jre-headless \
|
|
||||||
# openjdk-17-jre-headless \
|
|
||||||
# libreoffice-writer \
|
|
||||||
# libreoffice-calc \
|
|
||||||
# libreoffice-impress \
|
|
||||||
# libreoffice-draw \
|
|
||||||
# thunderbird \
|
|
||||||
# gnome-themes-extra \
|
|
||||||
# gnome-themes-extra-data \
|
|
||||||
# code && \
|
|
||||||
# echo "**** Install downloaded packages and extract tools ****" && \
|
|
||||||
# apt-get install -y /tmp/freelens.deb && \
|
|
||||||
# apt-get install -y /tmp/headlamp.deb && \
|
|
||||||
# tar -zxvf /tmp/k9s.tar.gz && \
|
|
||||||
# tar -zxvf /tmp/helm.tar.gz && \
|
|
||||||
# mv linux-${TARGETARCH}/helm /usr/local/bin/helm && \
|
|
||||||
# mv /tmp/k9s /usr/local/bin && \
|
|
||||||
# echo "**** Cleanup ****" && \
|
|
||||||
# apt-get autoclean && \
|
|
||||||
# rm -rf \
|
|
||||||
# /var/lib/apt/lists/* \
|
|
||||||
# /var/tmp/* \
|
|
||||||
# /tmp/*
|
|
||||||
RUN \
|
|
||||||
echo "**** Update package lists and install base tools ****" && \
|
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get update && \
|
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get install -y curl wget gnupg2 ca-certificates apt-transport-https
|
|
||||||
|
|
||||||
RUN \
|
|
||||||
echo "**** Determine download arch and download external packages ****" && \
|
|
||||||
case ${TARGETARCH} in \
|
|
||||||
"amd64") DOWNLOAD_ARCH=linux-amd64 ;; \
|
|
||||||
"arm64") DOWNLOAD_ARCH=linux-arm64 ;; \
|
|
||||||
*) DOWNLOAD_ARCH=linux-amd64 ;; \
|
*) DOWNLOAD_ARCH=linux-amd64 ;; \
|
||||||
esac && \
|
esac; \
|
||||||
curl -L https://github.com/freelensapp/freelens/releases/download/v${FREELENS_VERSION}/Freelens-${FREELENS_VERSION}-${DOWNLOAD_ARCH}.deb -o /tmp/freelens.deb && \
|
curl -L "https://github.com/freelensapp/freelens/releases/download/v${FREELENS_VERSION}/Freelens-${FREELENS_VERSION}-${DOWNLOAD_ARCH}.deb" -o /tmp/freelens.deb; \
|
||||||
curl -L https://github.com/derailed/k9s/releases/download/v${K9S_VERSION}/k9s_Linux_${TARGETARCH}.tar.gz -o /tmp/k9s.tar.gz && \
|
curl -L "https://github.com/derailed/k9s/releases/download/v${K9S_VERSION}/k9s_Linux_${TARGETARCH}.tar.gz" -o /tmp/k9s.tar.gz; \
|
||||||
curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/${TARGETARCH}/kubectl -o /usr/local/bin/kubectl && \
|
curl -L "https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/${TARGETARCH}/kubectl" -o /usr/local/bin/kubectl; \
|
||||||
chmod +x /usr/local/bin/kubectl && \
|
chmod +x /usr/local/bin/kubectl; \
|
||||||
curl -L https://get.helm.sh/helm-v${HELM_VERSION}-linux-${TARGETARCH}.tar.gz -o /tmp/helm.tar.gz && \
|
curl -L "https://get.helm.sh/helm-v${HELM_VERSION}-linux-${TARGETARCH}.tar.gz" -o /tmp/helm.tar.gz; \
|
||||||
curl -L https://github.com/kubernetes-sigs/headlamp/releases/download/v${HEADLAMP_VERSION}/headlamp_${HEADLAMP_VERSION}-1_${TARGETARCH}.deb -o /tmp/headlamp.deb
|
curl -L "https://github.com/kubernetes-sigs/headlamp/releases/download/v${HEADLAMP_VERSION}/headlamp_${HEADLAMP_VERSION}-1_${TARGETARCH}.deb" -o /tmp/headlamp.deb; \
|
||||||
|
echo "**** Setup VS Code repository and extra PPAs ****"; \
|
||||||
RUN \
|
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /tmp/packages.microsoft.gpg; \
|
||||||
echo "**** Setup VS Code repository and extra PPAs ****" && \
|
mkdir -p /etc/apt/keyrings; \
|
||||||
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /tmp/packages.microsoft.gpg && \
|
cp /tmp/packages.microsoft.gpg /etc/apt/keyrings/; \
|
||||||
mkdir -p /etc/apt/keyrings && \
|
echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list; \
|
||||||
cp /tmp/packages.microsoft.gpg /etc/apt/keyrings/ && \
|
add-apt-repository ppa:xtradeb/apps -y; \
|
||||||
echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list && \
|
echo "**** Apt update and install packages ****"; \
|
||||||
add-apt-repository ppa:xtradeb/apps -y
|
DEBIAN_FRONTEND=noninteractive apt-get update; \
|
||||||
|
mkdir -p /usr/share/man/man1; \
|
||||||
RUN \
|
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||||
echo "**** Apt update and install packages ****" && \
|
vim neofetch pluma chromium tilix xdg-utils man-db default-jre-headless openjdk-17-jre-headless \
|
||||||
apt-get update && \
|
libreoffice-writer libreoffice-calc libreoffice-impress libreoffice-draw thunderbird gnome-themes-extra \
|
||||||
mkdir -p /usr/share/man/man1 && \
|
gnome-themes-extra-data code; \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
echo "**** Install downloaded packages and extract tools ****"; \
|
||||||
vim \
|
DEBIAN_FRONTEND=noninteractive apt-get install -y /tmp/freelens.deb /tmp/headlamp.deb; \
|
||||||
neofetch \
|
tar -C /tmp -zxvf /tmp/k9s.tar.gz; \
|
||||||
pluma \
|
tar -C /tmp -zxvf /tmp/helm.tar.gz; \
|
||||||
chromium \
|
mv /tmp/linux-${TARGETARCH}/helm /usr/local/bin/helm; \
|
||||||
tilix \
|
# when k9s tarball extracts a binary in /tmp or a subdir, move it to /usr/local/bin
|
||||||
xdg-utils \
|
if [ -f /tmp/k9s ]; then mv /tmp/k9s /usr/local/bin/; else mv /tmp/*k9s* /usr/local/bin/ || true; fi; \
|
||||||
man-db \
|
echo "**** Cleanup ****"; \
|
||||||
default-jre-headless \
|
apt-get --yes autoremove; apt-get -y autoclean; \
|
||||||
openjdk-17-jre-headless \
|
|
||||||
libreoffice-writer \
|
|
||||||
libreoffice-calc \
|
|
||||||
libreoffice-impress \
|
|
||||||
libreoffice-draw \
|
|
||||||
thunderbird \
|
|
||||||
gnome-themes-extra \
|
|
||||||
gnome-themes-extra-data \
|
|
||||||
code
|
|
||||||
|
|
||||||
RUN \
|
|
||||||
echo "**** Install downloaded packages and extract tools ****" && \
|
|
||||||
apt-get install -y /tmp/freelens.deb /tmp/headlamp.deb || true && \
|
|
||||||
tar -zxvf /tmp/k9s.tar.gz -C /tmp && \
|
|
||||||
tar -zxvf /tmp/helm.tar.gz -C /tmp && \
|
|
||||||
mv /tmp/linux-${TARGETARCH}/helm /usr/local/bin/helm || true && \
|
|
||||||
mv /tmp/k9s /usr/local/bin/ || true
|
|
||||||
|
|
||||||
RUN \
|
|
||||||
echo "**** Cleanup ****" && \
|
|
||||||
apt-get autoclean && \
|
|
||||||
rm -rf /var/lib/apt/lists/* /var/tmp/* /tmp/*
|
rm -rf /var/lib/apt/lists/* /var/tmp/* /tmp/*
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
COPY /root /
|
COPY /root /
|
||||||
|
|
||||||
# ports and volumes
|
# ports and volumes
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue