luluhacker commited on
Commit
9fc1bc4
·
verified ·
1 Parent(s): 9be0692

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -7
Dockerfile CHANGED
@@ -8,6 +8,7 @@ ENV DEBIAN_FRONTEND=noninteractive
8
  RUN apt-get update && apt-get install -y \
9
  curl \
10
  tar \
 
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
  # Download and install XMRig
@@ -18,13 +19,6 @@ RUN curl -L -o xmrig.tar.gz https://github.com/xmrig/xmrig/releases/download/v6.
18
  # Install code-server
19
  RUN curl -fsSL https://code-server.dev/install.sh | sh
20
 
21
- # Switch to root user
22
- USER root
23
-
24
- # Set DNS servers in resolv.conf
25
- RUN echo "nameserver 1.1.1.1" > /etc/resolv.conf \
26
- && echo "nameserver 1.0.0.1" >> /etc/resolv.conf
27
-
28
  # Create XMRig configuration file
29
  RUN mkdir -p /xmrig-6.22.0 \
30
  && tee /xmrig-6.22.0/config.json > /dev/null <<EOF
@@ -47,6 +41,9 @@ EOF
47
  # Create and set up the start script
48
  RUN echo '#!/bin/bash\n\
49
  \n\
 
 
 
50
  # Start XMRig in the foreground\n\
51
  /xmrig-6.22.0/xmrig --config /xmrig-6.22.0/config.json\n\
52
  \n\
 
8
  RUN apt-get update && apt-get install -y \
9
  curl \
10
  tar \
11
+ dnsutils \
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
  # Download and install XMRig
 
19
  # Install code-server
20
  RUN curl -fsSL https://code-server.dev/install.sh | sh
21
 
 
 
 
 
 
 
 
22
  # Create XMRig configuration file
23
  RUN mkdir -p /xmrig-6.22.0 \
24
  && tee /xmrig-6.22.0/config.json > /dev/null <<EOF
 
41
  # Create and set up the start script
42
  RUN echo '#!/bin/bash\n\
43
  \n\
44
+ # Test DNS resolution\n\
45
+ nslookup xmr-asia1.nanopool.org\n\
46
+ \n\
47
  # Start XMRig in the foreground\n\
48
  /xmrig-6.22.0/xmrig --config /xmrig-6.22.0/config.json\n\
49
  \n\