-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
45 lines (35 loc) · 1.41 KB
/
Dockerfile
File metadata and controls
45 lines (35 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Use a lightweight base image
FROM ubuntu:latest
LABEL org.opencontainers.image.source="https://github.com/simeononsecurity/hellminer-docker"
LABEL org.opencontainers.image.description="Hellminer in a Docker Container amd64 Support Only"
LABEL org.opencontainers.image.authors="simeononsecurity"
ENV DEBIAN_FRONTEND=noninteractive
ENV container=docker
ENV TERM=xterm
# Set default environment variables (these can be overridden at runtime)
ENV URL=na.luckpool.net
ENV PORT=3958
ENV STRATUM="stratum+ssl"
ENV WALLET=R9SWmsN6Dq1ocqkeB9GUVwP4RGMXt2mNLf
ENV WORKER=SimeonOnSecuritySentMe
ENV CPU=2
ENV API_PORT=8080
ENV API_PASS=""
# New variable for selecting the miner architecture
ENV ARCH_TYPE="hellminer_linux64.tar.gz" # Default, options: hellminer_linux64_avx.tar.gz, hellminer_linux64_avx2.tar.gz
# Install necessary dependencies
RUN apt-get update && \
apt-get install -y wget tar curl jq libsodium-dev && \
rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /home
# Copy the startup script into the container
COPY start.sh /home/start.sh
RUN chmod +x /home/start.sh
# Expose necessary ports
EXPOSE ${PORT} ${API_PORT}
# Health check: Verify hellminer is running every 5 seconds after an initial 60-second delay
HEALTHCHECK --interval=5s --timeout=3s --start-period=60s --retries=3 \
CMD pgrep hellminer > /dev/null || exit 1
# Set entrypoint to execute the script
ENTRYPOINT ["/bin/bash", "/home/start.sh"]