From c308a4d45561cb171c460bcdcfdac163df934a8a Mon Sep 17 00:00:00 2001 From: Kunal Yadavaa <118655080+kunalyadavaa@users.noreply.github.com> Date: Tue, 26 Aug 2025 18:00:09 +0530 Subject: [PATCH] Update Dockerfile Qemu Emulation added for Architecture support --- remote-desktop/Dockerfile | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/remote-desktop/Dockerfile b/remote-desktop/Dockerfile index 12962ea..83eb1d0 100644 --- a/remote-desktop/Dockerfile +++ b/remote-desktop/Dockerfile @@ -1,6 +1,10 @@ -# Base Image +# Base Image (x86_64 build only) FROM nishanb/ck-x-simulator-vnc-base:v3 +# --- Add QEMU for ARM emulation --- +# This lets the container run on ARM hosts even if the base image is amd64 +COPY --from=multiarch/qemu-user-static:latest /usr/bin/qemu-* /usr/bin/ + # Switch to root user for installations USER 0 @@ -17,32 +21,31 @@ RUN apt-get update && apt-get install -y \ telnet \ nano \ vim \ - curl \ - wget \ - xclip + xclip \ + && rm -rf /var/lib/apt/lists/* -#create candidate user +# create candidate user RUN useradd -m candidate -#set hostname as terminal +# set hostname as terminal RUN echo "export HOSTNAME=terminal" >> /headless/.bashrc -#set terminal to bash +# set terminal to bash RUN echo "export TERM=xterm" >> /headless/.bashrc -#when shell open switch to candidate user +# when shell opens, switch to candidate user RUN echo "cd /home/candidate && su candidate" >> /headless/.bashrc -#disable asking for ssh host verification -RUN mkdir -p /home/candidate/.ssh -RUN touch /home/candidate/.ssh/config -RUN echo "StrictHostKeyChecking no" >> /home/candidate/.ssh/config -RUN echo "UserKnownHostsFile /dev/null" >> /home/candidate/.ssh/config - +# disable asking for ssh host verification +RUN mkdir -p /home/candidate/.ssh && \ + echo "StrictHostKeyChecking no" >> /home/candidate/.ssh/config && \ + echo "UserKnownHostsFile /dev/null" >> /home/candidate/.ssh/config # Copy startup script COPY startup.sh /usr/local/bin/startup.sh RUN chmod +x /usr/local/bin/startup.sh +# Copy agent COPY agent.py /tmp/agent.py -RUN sed -i '/### every exit != 0 fails the script/a /usr/local/bin/startup.sh' /dockerstartup/vnc_startup.sh \ No newline at end of file +# Inject startup script into vnc_startup.sh +RUN sed -i '/### every exit != 0 fails the script/a /usr/local/bin/startup.sh' /dockerstartup/vnc_startup.sh