adding new build

This commit is contained in:
Michael Trip 2025-09-17 14:18:09 +02:00
parent 7f6d04cb3d
commit f9856c17fc
6 changed files with 108 additions and 90 deletions

View file

@ -1,69 +0,0 @@
FROM ghcr.io/linuxserver/rdesktop:ubuntu-mate
# set version label
ARG BUILD_DATE
# ARG BUILDARCH
ARG TARGETARCH
ARG VERSION
ARG KUBECTL_VERSION=1.30.2
ARG HELM_VERSION=3.15.2
ARG SEABIRD_VERSION=0.6.0
ARG K9S_VERSION=0.50.9
ARG FREELENS_VERSION=1.5.3
LABEL build_version="based on Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="Michael Trip"
WORKDIR /tmp
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y curl wget
RUN \
case ${TARGETARCH} in \
"amd64") DOWNLOAD_ARCH=linux-amd64 ;; \
"arm64") DOWNLOAD_ARCH=linux-arm64 ;; \
esac \
&& curl -L https://github.com/freelensapp/freelens/releases/download/v${FREELENS_VERSION}/Freelens-${FREELENS_VERSION}-${DOWNLOAD_ARCH}.deb --output /tmp/freelens.deb
RUN curl -L https://github.com/derailed/k9s/releases/download/v${K9S_VERSION}/k9s_Linux_${TARGETARCH}.tar.gz --output /tmp/k9s.tar.gz
RUN curl -L https://storage.googleapis.com/kubernetes-release/release/v${KUBECTL_VERSION}/bin/linux/${TARGETARCH}/kubectl --output /usr/local/bin/kubectl && chmod +x /usr/local/bin/kubectl
RUN curl -L https://get.helm.sh/helm-v${HELM_VERSION}-linux-${TARGETARCH}.tar.gz --output /tmp/helm.tar.gz
RUN curl -L https://github.com/getseabird/seabird/releases/download/v${SEABIRD_VERSION}/seabird_linux_${TARGETARCH}.tar.gz --output /tmp/seabird.tar.gz
RUN \
echo "**** install packages ****" && \
apt update && \
DEBIAN_FRONTEND=noninteractive apt-get install wget -y && \
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 && \
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 && \
DEBIAN_FRONTEND=noninteractive apt-get install apt-transport-https -y &&\
apt-get update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install --no-install-recommends -y \
vim \
neofetch \
libreoffice \
thunderbird \
pluma \
tilix \
terminator \
code \
mate-themes \
xdg-utils && \
apt-get install -y /tmp/freelens.deb && \
tar -zxvf /tmp/k9s.tar.gz && \
tar -zxvf /tmp/seabird.tar.gz && \
tar -zxvf /tmp/helm.tar.gz && \
mv linux-${TARGETARCH}/helm /usr/local/bin/helm && \
mv /tmp/k9s /usr/local/bin && \
mv /tmp/seabird /usr/local/bin && \
echo "**** cleanup ****" && \
apt-get autoclean && \
rm -rf \
/var/lib/apt/lists/* \
/var/tmp/* \
/tmp/*
COPY /root /
# ports and volumes
EXPOSE 3389
VOLUME /home
VOLUME /config

View file

@ -1,37 +0,0 @@
#!/usr/bin/with-contenv bash
echo "**** create ${USERNAME} user and make our folders ****" && \
useradd -u 912 -U -d /home/${USERNAME} -s /bin/bash ${USERNAME}
usermod -G users,sudo ${USERNAME}
echo "${USERNAME}:${PASSWORD}" | chpasswd
mkdir -p /home/${USERNAME}
chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}
chmod 755 /etc
chmod 755 /etc/xrdp
chmod 755 /etc/xrdp/sesman.ini
touch /home/${USERNAME}/lock.file
# create .config dir
[[ ! -d /home/${USERNAME}/.config ]] && \
mkdir -p /home/${USERNAME}/.config
cp /defaults/startwm.sh /home/${USERNAME}/startwm.sh
chmod +x /home/${USERNAME}/startwm.sh
chown -R ${USERNAME}:${USERAME} /home/${USERNAME}
# permissions
PERM=$(stat -c '%U' /home/${USERNAME}/.config)
[[ "${PERM}" != "${USERNAME}" ]] && \
chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}
# set random password for abc user to prevent it from connecting
RANDOM_PASS=`tr -dc A-Za-z0-9 </dev/urandom | head -c 13 ; echo ''`
echo abc:${RANDOM_PASS} | chpasswd
usermod -s /bin/false abc