91e75e620b
CI: cua-driver distro-compat matrix / Resolve release version (push) Waiting to run
CI: cua-driver distro-compat matrix / debian:12 (glibc 2.36) (push) Blocked by required conditions
CI: cua-driver distro-compat matrix / fedora:41 (glibc 2.40) (push) Blocked by required conditions
CI: cua-driver distro-compat matrix / rockylinux:9 (glibc 2.34) (push) Blocked by required conditions
CI: cua-driver distro-compat matrix / ubuntu:22.04 (glibc 2.35) (push) Blocked by required conditions
CI: cua-driver distro-compat matrix / ubuntu:24.04 (glibc 2.39) (push) Blocked by required conditions
CI: cua-driver distro-compat matrix / Distro compat summary (push) Blocked by required conditions
CI: Nix Linux Rust source / Nix / compositor build (push) Waiting to run
CI: Nix Linux Rust source / Nix / driver package (push) Waiting to run
CI: Nix Linux Rust source / Nix / Rust unit tests (push) Waiting to run
CI: Rust Linux unit / Rust Linux unit and compile (push) Waiting to run
CI: Rust Windows unit / Rust Windows unit and compile (push) Waiting to run
CI: SPDX Headers / Check SPDX headers (warn-only) (push) Waiting to run
CD: Docs MCP Server / build (linux/amd64) (push) Waiting to run
CD: Docs MCP Server / build (linux/arm64) (push) Waiting to run
CD: Docs MCP Server / merge (push) Blocked by required conditions
71 lines
2.5 KiB
Docker
71 lines
2.5 KiB
Docker
FROM kasmweb/core-ubuntu-jammy:1.17.0
|
|
USER root
|
|
|
|
ENV HOME=/home/kasm-default-profile
|
|
ENV STARTUPDIR=/dockerstartup
|
|
ENV INST_SCRIPTS=$STARTUPDIR/install
|
|
WORKDIR $HOME
|
|
|
|
######### Customize Container Here ###########
|
|
|
|
# Installing python, pip, and libraries (but don't change default yet)
|
|
RUN apt-get update && \
|
|
apt install -y wget build-essential libncursesw5-dev libssl-dev \
|
|
libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev && \
|
|
add-apt-repository ppa:deadsnakes/ppa && \
|
|
apt-get update && \
|
|
apt install -y python3.12 python3.12-dev python3.12-tk \
|
|
gnome-screenshot wmctrl ffmpeg socat xclip curl && \
|
|
apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install Firefox (do this BEFORE changing default Python, as add-apt-repository needs system Python)
|
|
ENV DEBIAN_FRONTEND=noninteractive \
|
|
INST_DIR=$STARTUPDIR/install
|
|
COPY ./src/ $INST_DIR
|
|
RUN bash ${INST_DIR}/ubuntu/install/firefox/install_firefox.sh
|
|
|
|
# Now set Python 3.12 as the default python3
|
|
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1 && \
|
|
update-alternatives --set python3 /usr/bin/python3.12
|
|
|
|
# Install pip for Python 3.12
|
|
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.12
|
|
|
|
# Disable SSL requirement
|
|
RUN sed -i 's/require_ssl: true/require_ssl: false/g' /usr/share/kasmvnc/kasmvnc_defaults.yaml
|
|
RUN sed -i 's/-sslOnly//g' /dockerstartup/vnc_startup.sh
|
|
|
|
# Enable sudo support for kasm-user
|
|
RUN echo "kasm-user:password" | chpasswd
|
|
RUN usermod -aG sudo kasm-user
|
|
RUN echo "kasm-user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
|
|
|
######### End Customizations ###########
|
|
|
|
RUN chown 1000:0 $HOME
|
|
RUN $STARTUPDIR/set_user_permission.sh $HOME
|
|
ENV HOME=/home/kasm-user
|
|
WORKDIR $HOME
|
|
RUN mkdir -p $HOME && chown -R 1000:0 $HOME
|
|
|
|
# Install UV package manager
|
|
RUN python3.12 -m pip install uv
|
|
|
|
# Install cua-computer-server and cua-agent
|
|
RUN uv pip install --system cua-computer-server "cua-agent[all]"
|
|
|
|
# Install playwright and Firefox dependencies
|
|
RUN uv pip install --system playwright && \
|
|
python3.12 -m playwright install --with-deps firefox
|
|
|
|
# Clean up uv cache to avoid issues and reduce size
|
|
RUN rm -rf /home/kasm-user/.cache/uv /root/.cache/uv
|
|
|
|
# Fix ownership of remaining cache files
|
|
RUN chown -R 1000:0 /home/kasm-user/.cache 2>/dev/null || true
|
|
|
|
# Running the python script on startup
|
|
RUN echo -e "#!/bin/bash\nsudo uv pip install --upgrade --system cua-computer-server \"cua-agent[all]\"\n/usr/bin/python3 -m computer_server" > $STARTUPDIR/custom_startup.sh \
|
|
&& chmod +x $STARTUPDIR/custom_startup.sh
|
|
|
|
USER 1000 |