switching to TARGETARCH

This commit is contained in:
Michael Trip 2023-10-03 17:09:13 +02:00
parent d40ab17825
commit 74813250a6
2 changed files with 21 additions and 11 deletions

View file

@ -8,15 +8,24 @@ ARG BUILDARCH
LABEL build_version="based on Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="Michael Trip"
WORKDIR /tmp
RUN \
dnf install -y wget && \
if [ "$BUILDARCH" = "amd64" ]; then \
wget -O /tmp/openlens.rpm https://github.com/MuhammedKalkan/OpenLens/releases/download/v6.5.2-366/OpenLens-6.5.2-366.x86_64.rpm; \
elif [ "$BUILDARCH" = "arm64" ]; then \
wget -O /tmp/openlens.rpm https://github.com/MuhammedKalkan/OpenLens/releases/download/v6.5.2-366/OpenLens-6.5.2-366.aarch64.rpm; \
else \
echo "Unsupported architecture: $BUILDARCH"; \
exit 1; \
fi
RUN \
echo "**** install packages ****" && \
rpm --import https://packages.microsoft.com/keys/microsoft.asc && \
echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo && \
dnf install -y wget && \
echo "Install and download OpenLens" && \
if [ "$BUILDARCH" = "amd64" ]; then wget -O /tmp/openlens.rpm https://github.com/MuhammedKalkan/OpenLens/releases/download/v6.5.2-366/OpenLens-6.5.2-366.x86_64.rpm; elif [ "$BUILDARCH" = "arm64" ]; then wget -O /tmp/openlens.rpm https://github.com/MuhammedKalkan/OpenLens/releases/download/v6.5.2-366/OpenLens-6.5.2-366.aarch64.rpm; else echo "Unsupported"; exit 1; fi && \
echo "Install and download k9s" && \
wget https://github.com/derailed/k9s/releases/download/v0.27.4/k9s_Linux_$BUILDARCH.tar.gz && \
wget -o /tmp/k9s.tar.gz https://github.com/derailed/k9s/releases/download/v0.27.4/k9s_Linux_$BUILDARCH.tar.gz && \
dnf install -y --setopt=install_weak_deps=False --best \
terminator \
tilix \
@ -30,8 +39,8 @@ RUN \
thunderbird \
firefox \
code && \
if [ "$BUILDARCH" = "amd64" ]; dnf localinstall -y /tmp/OpenLens-6.5.2-366.aarch64.rpm; elif [ "$BUILDARCH" = "arm64" ]; then dnf localinstall -y /tmp/OpenLens-6.5.2-366.aarch64.rpm; fi && \
tar -zxvf /tmp/k9s_Linux_$BUILDARCH.tar.gz && \
dnf localinstall -y /tmp/openlens.rpm && \
tar -zxvf /tmp/k9s.tar.gz && \
mv /tmp/k9s /usr/local/bin && \
echo "**** cleanup ****" && \
dnf autoremove -y && \

View file

@ -1,6 +1,7 @@
FROM ghcr.io/linuxserver/rdesktop:ubuntu-mate
# set version label
ARG BUILD_DATE
ARG BUILDARCH
ARG VERSION
LABEL build_version="based on Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="Michael Trip"
@ -13,9 +14,9 @@ RUN \
curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor -o /etc/apt/keyrings/kubernetes-archive-keyring.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | tee /etc/apt/sources.list.d/kubernetes.list && \
echo "Downloading and installing OpenLens" && \
wget https://github.com/MuhammedKalkan/OpenLens/releases/download/v6.5.2-366/OpenLens-6.5.2-366.$BUILDARCH.deb && \
wget -o /tmp/openlens.deb https://github.com/MuhammedKalkan/OpenLens/releases/download/v6.5.2-366/OpenLens-6.5.2-366.$BUILDARCH.deb && \
echo "downloading and installing k9s" &&\
wget https://github.com/derailed/k9s/releases/download/v0.27.4/k9s_Linux_$BUILDARCH.tar.gz && \
wget -o /tmp/k9s.tar.gz https://github.com/derailed/k9s/releases/download/v0.27.4/k9s_Linux_$BUILDARCH.tar.gz && \
echo "**** Installing vscode stuff ***" && \
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg && \
cp packages.microsoft.gpg /etc/apt/keyrings && \
@ -34,8 +35,8 @@ RUN \
kubectl \
code \
xdg-utils && \
dpkg -i /tmp/OpenLens-6.5.2.366.$BUILDARCH.deb && \
tar -zxvf /tmp/k9s_Linux_$BUILDARCH.tar.gz && \
dpkg -i /tmp/openlens.deb && \
tar -zxvf /tmp/k9s.tar.gz && \
mv /tmp/k9s /usr/local/bin && \
echo "**** cleanup ****" && \
apt-get autoclean && \