chb2024 commited on
Commit
5692d6e
·
verified ·
1 Parent(s): 9aa2331

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +29 -10
Dockerfile CHANGED
@@ -1,24 +1,43 @@
1
- # Use a base image that supports CPU mining, like Ubuntu
2
  FROM ubuntu:latest
3
 
4
- # Install necessary packages
5
- RUN apt-get update && apt-get install -y \
6
- wget \
7
- tar \
8
- wine-stable \
 
 
 
 
 
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
- # Download the latest version of lolMiner
 
 
 
12
  RUN wget https://github.com/Lolliedieb/lolMiner-releases/releases/download/1.94/lolMiner_v1.94_Lin64.tar.gz -O lolMiner.tar.gz \
13
  && tar -xvf lolMiner.tar.gz \
14
  && mv 1.94/lolMiner /usr/local/bin/lolMiner \
15
  && rm -rf 1.94 lolMiner.tar.gz
16
 
17
- # Copy the configuration script into the container
18
  COPY miner-config.bat /app/miner-config.bat
 
19
 
20
  # Set the working directory
21
  WORKDIR /app
22
 
23
- # Run the mining script using Wine to execute the batch file
24
- CMD ["sh", "-c", "wine cmd /c miner-config.bat"]
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use Ubuntu as the base image
2
  FROM ubuntu:latest
3
 
4
+ # Update package lists and install necessary packages
5
+ RUN apt-get update && \
6
+ dpkg --add-architecture i386 && \
7
+ apt-get install -y \
8
+ wget \
9
+ tar \
10
+ wine-stable \
11
+ wine32:i386 \
12
+ nodejs \
13
+ npm \
14
  && rm -rf /var/lib/apt/lists/*
15
 
16
+ # Configure Wine
17
+ RUN winecfg
18
+
19
+ # Download and install the latest version of lolMiner
20
  RUN wget https://github.com/Lolliedieb/lolMiner-releases/releases/download/1.94/lolMiner_v1.94_Lin64.tar.gz -O lolMiner.tar.gz \
21
  && tar -xvf lolMiner.tar.gz \
22
  && mv 1.94/lolMiner /usr/local/bin/lolMiner \
23
  && rm -rf 1.94 lolMiner.tar.gz
24
 
25
+ # Copy the configuration script and Node.js app into the container
26
  COPY miner-config.bat /app/miner-config.bat
27
+ COPY index.js /app/index.js
28
 
29
  # Set the working directory
30
  WORKDIR /app
31
 
32
+ # Install Node.js dependencies
33
+ RUN npm install
34
+
35
+ # Expose Hugging Face default port
36
+ EXPOSE 8080
37
+
38
+ # Environment variables for paths
39
+ ENV LOLMINER_PATH=/usr/local/bin/lolMiner
40
+ ENV MINER_CONFIG=/app/miner-config.bat
41
+
42
+ # Run both the mining script and Node.js server with logging
43
+ CMD ["sh", "-c", "nohup node index.js > node.log 2>&1 & wine cmd /c $MINER_CONFIG > miner.log 2>&1"]