VNC-151 Add SSH support in Ubuntu Jammy development Dockerfile

This commit is contained in:
El 2025-11-24 10:54:38 +00:00
parent 9b71785d08
commit e46ba4cfa7
No known key found for this signature in database
GPG key ID: 205388FEB607950A

View file

@ -7,6 +7,7 @@ ENV XORG_PATCH 21
ENV DEBIAN_FRONTEND noninteractive
EXPOSE 6901
EXPOSE 22
USER root
@ -58,9 +59,12 @@ RUN sed -i 's$# deb-src$deb-src$' /etc/apt/sources.list && \
libpam0g-dev \
libbsd-dev \
intel-media-va-driver-non-free \
openssh-server \
inotify-tools
inotify-tools && \
echo "kasm-user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
RUN echo "kasm-user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
mkdir -p /var/run/sshd && \
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
RUN apt install -y nodejs nginx
@ -69,8 +73,11 @@ ENV SCRIPTS_DIR=/tmp/scripts
COPY builder/scripts $SCRIPTS_DIR
RUN $SCRIPTS_DIR/build-deps.sh
RUN ssh-keygen -A
RUN echo "kasm-user:password" | chpasswd
USER 1000
WORKDIR /src
ENTRYPOINT /bin/bash
ENTRYPOINT ["/bin/bash", "-c", "sudo /usr/sbin/sshd && exec /bin/bash"]