forked from Dellear/UnicomTaskDocker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
27 lines (27 loc) · 1.02 KB
/
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
FROM python:alpine
COPY docker-entrypoint.sh /
ARG SCRIPT_URL=https://github.com/asksowhat/unicom-task.git
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
LANG=zh_CN.UTF-8 \
PS1="\u@\h:\w\$ " \
TZ=Asia/Shanghai \
SCRIPT_BRANCH=main \
SCRIPT_DIR=/UnicomTask
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
&& apk update -f \
&& apk upgrade \
&& apk --no-cache add -f bash \
git \
tzdata \
g++ \
gcc \
libxslt-dev \
libxml2-dev \
&& git clone -b ${SCRIPT_BRANCH} ${SCRIPT_URL} ${SCRIPT_DIR} \
&& pip install --no-cache-dir -r ${SCRIPT_DIR}/requirements.txt \
&& ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \
&& echo ${TZ} > /etc/timezone \
&& rm -rf /var/cache/* \
&& chmod +x /docker-entrypoint.sh
WORKDIR ${SCRIPT_DIR}
ENTRYPOINT /docker-entrypoint.sh