Skip to content

Commit

Permalink
Merge branch 'feature/KASM-2779-jammy-images' into 'master'
Browse files Browse the repository at this point in the history
Resolve KASM-2779 "Feature/ jammy images"

Closes KASM-2779

See merge request kasm-technologies/internal/KasmVNC!49
  • Loading branch information
j-travis committed Jun 22, 2022
2 parents 8542a5f + c32521b commit 61f08d4
Show file tree
Hide file tree
Showing 8 changed files with 196 additions and 3 deletions.
36 changes: 36 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,42 @@ build_ubuntu_focal_arm:
paths:
- output/

build_ubuntu_jammy:
stage: build
allow_failure: true
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package ubuntu jammy;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/

build_ubuntu_jammy_arm:
stage: build
allow_failure: true
tags:
- arm
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package ubuntu jammy;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/

build_debian_buster:
stage: build
allow_failure: true
Expand Down
2 changes: 1 addition & 1 deletion builder/dockerfile.opensuse_15.barebones.rpm.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM opensuse/leap:15
FROM opensuse/leap:15.3

# base tools
RUN zypper -n install -y \
Expand Down
2 changes: 1 addition & 1 deletion builder/dockerfile.opensuse_15.build
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM opensuse/leap:15
FROM opensuse/leap:15.3

ENV KASMVNC_BUILD_OS opensuse
ENV KASMVNC_BUILD_OS_CODENAME 15
Expand Down
2 changes: 1 addition & 1 deletion builder/dockerfile.opensuse_15.rpm.build
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM opensuse/leap:15
FROM opensuse/leap:15.3

ENV KASMVNC_BUILD_OS opensuse
ENV KASMVNC_BUILD_OS_CODENAME 15
Expand Down
30 changes: 30 additions & 0 deletions builder/dockerfile.ubuntu_jammy.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM ubuntu:jammy

ENV KASMVNC_BUILD_OS ubuntu
ENV KASMVNC_BUILD_OS_CODENAME jammy
ENV XORG_VER 1.20.8
ENV DEBIAN_FRONTEND noninteractive

RUN sed -i 's$# deb-src$deb-src$' /etc/apt/sources.list

RUN apt-get update && \
apt-get -y install sudo

RUN apt-get update && apt-get install -y --no-install-recommends tzdata
RUN apt-get update && apt-get -y build-dep xorg-server libxfont-dev
RUN apt-get update && apt-get -y install cmake git libjpeg-dev libgnutls28-dev vim wget tightvncserver
RUN apt-get update && apt-get -y install libpng-dev libtiff-dev libgif-dev libavcodec-dev libssl-dev libxrandr-dev libxcursor-dev

# Additions for webp
RUN cd /tmp && wget https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.0.2.tar.gz
RUN cd /tmp && tar -xzf /tmp/libwebp-*
RUN cd /tmp/libwebp-1.0.2 && \
./configure --enable-static --disable-shared && \
make && make install

RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo

COPY --chown=docker:docker . /src/

USER docker
ENTRYPOINT ["/src/builder/build.sh"]
19 changes: 19 additions & 0 deletions builder/dockerfile.ubuntu_jammy.deb.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM ubuntu:jammy

ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update && \
apt-get -y install vim build-essential devscripts equivs

# Install build-deps for the package.
COPY ./debian/control /tmp
RUN apt-get update && echo YYY | mk-build-deps --install --remove /tmp/control

ARG L_UID
RUN if [ "$L_UID" -eq 0 ]; then \
useradd -m docker; \
else \
useradd -m docker -u $L_UID;\
fi

USER docker
57 changes: 57 additions & 0 deletions builder/dockerfile.ubuntu_jammy.deb.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
FROM ubuntu:jammy

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_CODENAME=bionic

EXPOSE $VNC_PORT

WORKDIR $HOME

### REQUIRED STUFF ###

RUN apt-get update && apt-get install -y supervisor xfce4 xfce4-terminal xterm libnss-wrapper gettext wget
RUN apt-get purge -y pm-utils xscreensaver*
RUN apt-get update && apt-get install -y vim less
RUN apt-get update && apt-get -y install lsb-release

RUN echo 'source $STARTUPDIR/generate_container_user' >> $HOME/.bashrc

RUN mkdir -p $STARTUPDIR
COPY startup/ $STARTUPDIR

### START CUSTOM STUFF ####

ARG KASMVNC_PACKAGE_DIR
COPY $KASMVNC_PACKAGE_DIR/kasmvncserver_*.deb /tmp/
RUN rm -f /tmp/kasmvncserver_*+*.deb; dpkg -i /tmp/*.deb; apt-get -yf install

RUN mkdir ~/.vnc && echo '/usr/bin/xfce4-session &' >> ~/.vnc/xstartup && \
chmod +x ~/.vnc/xstartup

### END CUSTOM STUFF ###

RUN chown -R 1000:0 $HOME
USER 1000:ssl-cert
WORKDIR $HOME

ENTRYPOINT [ "/dockerstartup/vnc_startup.sh" ]
51 changes: 51 additions & 0 deletions builder/dockerfile.ubuntu_jammy.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
FROM ubuntu:jammy

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_CODENAME=jammy

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_CODENAME}.tar.gz /tmp/
RUN tar -xzvf /tmp/kasmvnc.${KASMVNC_BUILD_OS}_${KASMVNC_BUILD_OS_CODENAME}.tar.gz --strip 1 -C /

### END CUSTOM STUFF ###

RUN chown -R 1000:0 $HOME
USER 1000
WORKDIR $HOME

ENTRYPOINT [ "/dockerstartup/vnc_startup.sh" ]

0 comments on commit 61f08d4

Please sign in to comment.