From 543796d6a49f6d8b31a5b6fe97923e8840e02750 Mon Sep 17 00:00:00 2001 From: Dmitry Maksyoma Date: Thu, 7 Jan 2021 23:28:58 +1300 Subject: [PATCH] Deb: automated build chain draft ready --- builder/build-deb-inside-docker | 1 + builder/dockerfile.ubuntu1804.deb.test | 54 ++++++++++++++++++++++++++ builder/test-deb | 8 ++++ 3 files changed, 63 insertions(+) create mode 100644 builder/dockerfile.ubuntu1804.deb.test create mode 100755 builder/test-deb diff --git a/builder/build-deb-inside-docker b/builder/build-deb-inside-docker index 6c1636a..4dd7095 100755 --- a/builder/build-deb-inside-docker +++ b/builder/build-deb-inside-docker @@ -5,4 +5,5 @@ set -e cd "$(dirname "$0")/.." dpkg-buildpackage -us -uc -b +cp ../*.deb builder/build lintian ../*.deb diff --git a/builder/dockerfile.ubuntu1804.deb.test b/builder/dockerfile.ubuntu1804.deb.test new file mode 100644 index 0000000..9a86aae --- /dev/null +++ b/builder/dockerfile.ubuntu1804.deb.test @@ -0,0 +1,54 @@ +FROM ubuntu:18.04 + +ENV DISPLAY=:1 \ + VNC_PORT=8443 \ + VNC_RESOLUTION=1280x720 \ + MAX_FRAME_RATE=24 \ + VNCOPTIONS="-PreferBandwidth -DynamicQualityMin=4 -DynamicQualityMax=7" \ + HOME=/home/user \ + TERM=xterm \ + STARTUPDIR=/dockerstartup \ + INST_SCRIPTS=/dockerstartup/install \ + KASM_RX_HOME=/dockerstartup/kasmrx \ + DEBIAN_FRONTEND=noninteractive \ + VNC_COL_DEPTH=24 \ + VNC_RESOLUTION=1280x1024 \ + VNC_PW=vncpassword \ + VNC_USER=user \ + VNC_VIEW_ONLY_PW=vncviewonlypassword \ + LD_LIBRARY_PATH=/usr/local/lib/ \ + OMP_WAIT_POLICY=PASSIVE \ + SHELL=/bin/bash \ + SINGLE_APPLICATION=0 \ + KASMVNC_BUILD_OS=ubuntu \ + KASMVNC_BUILD_OS_VER=18.04 + +EXPOSE $VNC_PORT + +WORKDIR $HOME + +### REQUIRED STUFF ### + +RUN apt-get update && apt-get install -y supervisor xfce4 xfce4-terminal xterm libnss-wrapper gettext libjpeg-dev wget +RUN apt-get purge -y pm-utils xscreensaver* + +RUN echo 'source $STARTUPDIR/generate_container_user' >> $HOME/.bashrc + +RUN mkdir -p $STARTUPDIR +COPY startup/ $STARTUPDIR + +### START CUSTOM STUFF #### + +# COPY build/kasmvnc.${KASMVNC_BUILD_OS}_${KASMVNC_BUILD_OS_VER}.tar.gz /tmp/ +# RUN tar -xzvf /tmp/kasmvnc.${KASMVNC_BUILD_OS}_${KASMVNC_BUILD_OS_VER}.tar.gz --strip 1 -C / + +COPY build/*.deb /tmp +RUN dpkg -i /tmp/*.deb; apt -yf install + +### END CUSTOM STUFF ### + +RUN chown -R 1000:0 $HOME +USER 1000 +WORKDIR $HOME + +ENTRYPOINT [ "/dockerstartup/vnc_startup.sh" ] diff --git a/builder/test-deb b/builder/test-deb new file mode 100755 index 0000000..33ea333 --- /dev/null +++ b/builder/test-deb @@ -0,0 +1,8 @@ +#!/bin/bash + +set -e + +cd "$(dirname "$0")" + +docker build -t kasmvnctester-deb:18.04 -f dockerfile.ubuntu1804.deb.test . +docker run -it -p 443:8443 --rm -e "VNC_USER=username" -e "VNC_PW=password123" kasmvnctester-deb:18.04