Download Dockerfile from proti0070/Mx: direct link, hf CLI and curl.
- Browser
- Download file 2.83 kB
-
https://huggingface.co/spaces/proti0070/Mx/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/proti0070/Mx/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/proti0070/Mx/resolve/main/Dockerfile
2.83 kB
| FROM ubuntu:22.04 | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| ENV TZ=UTC | |
| # Install all necessary dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| # Base | |
| wget curl git unzip zip \ | |
| openjdk-17-jdk \ | |
| # X11 and GUI | |
| xvfb x11vnc fluxbox \ | |
| libxrender1 libxtst6 libxi6 libfontconfig1 \ | |
| libgtk-3-0 libnss3 libxss1 libasound2 libgbm1 \ | |
| # Web server | |
| nginx \ | |
| # Process manager | |
| supervisor \ | |
| # Terminal | |
| tini \ | |
| # Node.js for web IDE server | |
| nodejs npm \ | |
| # Additional useful tools | |
| nano vim htop \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Java setup | |
| ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64 | |
| ENV PATH=$PATH:$JAVA_HOME/bin | |
| # Download Android Studio | |
| RUN wget https://redirector.gvt1.com/edgedl/android/studio/ide-zips/2022.3.1.19/android-studio-2022.3.1.19-linux.tar.gz && \ | |
| tar -xzf android-studio-2022.3.1.19-linux.tar.gz -C /opt/ && \ | |
| rm android-studio-2022.3.1.19-linux.tar.gz | |
| # Android SDK | |
| RUN wget https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip && \ | |
| mkdir -p /opt/android-sdk/cmdline-tools && \ | |
| unzip commandlinetools-linux-9477386_latest.zip -d /opt/android-sdk/cmdline-tools/ && \ | |
| mv /opt/android-sdk/cmdline-tools/cmdline-tools /opt/android-sdk/cmdline-tools/latest && \ | |
| rm commandlinetools-linux-9477386_latest.zip | |
| # Install platform tools | |
| RUN wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip && \ | |
| unzip platform-tools-latest-linux.zip -d /opt/android-sdk/ && \ | |
| rm platform-tools-latest-linux.zip | |
| # Environment variables | |
| ENV ANDROID_HOME=/opt/android-sdk | |
| ENV PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools | |
| # Accept licenses | |
| RUN yes | /opt/android-sdk/cmdline-tools/latest/bin/sdkmanager --licenses || true | |
| # Install essential SDK components | |
| RUN /opt/android-sdk/cmdline-tools/latest/bin/sdkmanager \ | |
| "platform-tools" \ | |
| "platforms;android-33" \ | |
| "build-tools;33.0.0" | |
| # Install noVNC | |
| RUN git clone https://github.com/novnc/noVNC.git /opt/novnc && \ | |
| git clone https://github.com/novnc/websockify.git /opt/novnc/utils/websockify | |
| # Install web-based terminal | |
| RUN wget https://github.com/tsl0922/ttyd/releases/download/1.7.3/ttyd.x86_64 -O /usr/local/bin/ttyd && \ | |
| chmod +x /usr/local/bin/ttyd | |
| # Setup workspace | |
| WORKDIR /app | |
| # Copy application files | |
| COPY package.json server.js ./ | |
| COPY public/ ./public/ | |
| COPY nginx.conf /etc/nginx/nginx.conf | |
| COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf | |
| COPY start.sh /start.sh | |
| # Install Node dependencies | |
| RUN npm install | |
| # Create necessary directories | |
| RUN mkdir -p /workspace/projects /workspace/.android | |
| # Set permissions | |
| RUN chmod +x /start.sh && \ | |
| chmod -R 777 /workspace | |
| # HF Spaces port | |
| EXPOSE 7860 | |
| ENTRYPOINT ["/usr/bin/tini", "--"] | |
| CMD ["/start.sh"] |