-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
40 lines (32 loc) · 868 Bytes
/
Dockerfile
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
FROM alpine:3.7
ARG HP_SERVER_URL
ARG HP_VOUCHER
ENV HP_SERVER_URL=$HP_SERVER_URL
ENV HP_VOUCHER=$HP_VOUCHER
WORKDIR ["/opt"]
RUN apk upgrade --no-cache \
&& apk add --no-cache --update \
musl \
linux-headers \
g++ \
gcc \
libffi-dev \
build-base \
python3 \
python3-dev \
postgresql-dev \
bash \
git \
wget \
&& pip3 install --no-cache-dir --upgrade pip setuptools \
&& rm -rf /var/cache/* \
&& rm -rf /root/.cache/*
RUN cd /usr/bin \
&& ln -sf python3 python \
&& ln -sf pip3 pip
RUN pip install psutil requests && \
mkdir -p /opt && \
wget -q -O /opt/hashtopolis.zip $HP_SERVER_URL/agents.php?download=1
COPY entrypoint.sh /entrypoint.sh
#CMD ["/usr/bin/python", "/opt/hashtopolis.zip", "--voucher", "$HP_VOUCHER", "--url", "$HP_SERVER_URL/api/server.php"]
ENTRYPOINT ["/entrypoint.sh"]