2021-04-17 12:17:56 +00:00
|
|
|
FROM ubuntu:hirsute
|
|
|
|
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
|
|
|
|
LANG=zh_CN.UTF-8 \
|
|
|
|
SHELL=/bin/bash \
|
|
|
|
PS1="\u@\h:\w \$ " \
|
|
|
|
PAGERMAID_DIR=/pagermaid \
|
|
|
|
DEBIAN_FRONTEND=noninteractive
|
|
|
|
SHELL ["/bin/bash", "-c"]
|
|
|
|
RUN source ~/.bashrc \
|
|
|
|
&& apt update \
|
|
|
|
&& apt upgrade -y \
|
|
|
|
&& apt install --no-install-recommends -y \
|
|
|
|
software-properties-common \
|
|
|
|
build-essential \
|
2021-04-17 13:03:29 +00:00
|
|
|
sudo \
|
2021-04-17 12:17:56 +00:00
|
|
|
python3 \
|
|
|
|
python3-dev \
|
|
|
|
python3-pip \
|
|
|
|
python3-magic \
|
|
|
|
python3-dateparser \
|
|
|
|
tesseract-ocr \
|
|
|
|
tesseract-ocr-eng \
|
|
|
|
tesseract-ocr-chi-sim \
|
|
|
|
git \
|
|
|
|
openssl \
|
|
|
|
redis-server \
|
|
|
|
curl \
|
|
|
|
wget \
|
|
|
|
neofetch \
|
|
|
|
imagemagick \
|
|
|
|
ffmpeg \
|
|
|
|
fortune-mod \
|
|
|
|
figlet \
|
|
|
|
libzbar-dev \
|
|
|
|
libxslt1-dev \
|
|
|
|
libxml2-dev \
|
|
|
|
&& apt clean -y \
|
|
|
|
&& apt autoclean -y
|
|
|
|
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
|
|
|
|
&& echo "Asia/Shanghai" > /etc/timezone
|
|
|
|
RUN ln -sf /usr/bin/python3 /usr/bin/python \
|
|
|
|
&& python -m pip install --upgrade pip \
|
|
|
|
&& pip install wheel \
|
2021-04-17 14:54:31 +00:00
|
|
|
&& rm -rf /pagermaid/.cache
|
2021-04-17 14:30:48 +00:00
|
|
|
RUN echo "pagermaid ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/pagermaid
|
2020-08-10 18:10:33 +00:00
|
|
|
RUN useradd pagermaid -r -m -d /pagermaid
|
2021-04-17 13:24:48 +00:00
|
|
|
RUN usermod -aG sudo,users pagermaid
|
2020-02-19 15:31:39 +00:00
|
|
|
USER pagermaid
|
2021-04-17 13:49:58 +00:00
|
|
|
RUN mkdir /pagermaid/workdir
|
|
|
|
RUN git clone -b master https://github.com/Xtao-Labs/PagerMaid-Modify.git /pagermaid/workdir
|
|
|
|
WORKDIR /pagermaid/workdir
|
2021-04-17 14:00:04 +00:00
|
|
|
RUN python -m pip install -r requirements.txt \
|
2021-04-17 14:54:31 +00:00
|
|
|
&& rm -rf /pagermaid/.cache
|
2020-04-04 06:19:33 +00:00
|
|
|
CMD ["sh","utils/docker-run.sh"]
|