FROM ubuntu:22.04 ENV DEBIAN_FRONTEND=noninteractive ENV R3_REGISTRATION_CODE="7D3A85E9-0DDA-503C-B521-052F1F15D160" # Update and upgrade using both apt and apt-get RUN apt update && apt upgrade -y && \ apt-get update && apt-get upgrade -y && \ apt-get install -y \ python3 python3-pip \ nodejs npm \ openssh-client \ neofetch \ git \ curl \ procps \ ca-certificates && \ apt-get clean && rm -rf /var/lib/apt/lists/* # Install Telegram bot library RUN pip3 install --no-cache-dir pytelegrambotapi # Generate fresh SSH key (if needed) RUN mkdir -p /root/.ssh && \ ssh-keygen -t rsa -f /root/.ssh/id_rsa -N '' && \ chmod 700 /root/.ssh && chmod 600 /root/.ssh/id_rsa # Install remote.it agent using the registration code environment variable RUN sh -c "$(curl -L https://downloads.remote.it/remoteit/install_agent.sh)" # Dummy file to keep container alive RUN mkdir -p /app && echo "Remote.it Agent Running..." > /app/index.html WORKDIR /app EXPOSE 7860 # Start dummy HTTP server and remote.it agent CMD python3 -m http.server 7860 & remoteit agent start