Skip to content

Commit

Permalink
Merge pull request #10 from skye-z/dev
Browse files Browse the repository at this point in the history
cmpression image
  • Loading branch information
skye-z authored Feb 28, 2024
2 parents 0262122 + 4ad29a6 commit dcd7e01
Showing 1 changed file with 7 additions and 17 deletions.
24 changes: 7 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,16 @@
FROM alpine:3.18.2
FROM chromedp/headless-shell
MAINTAINER skye-z <skai-zhang@hotmail.com>

# 创建运行用户
RUN addgroup -S nonroot \
&& adduser -S betax -G nonroot

# 如需在中国大陆地区构建清取消下方注释
# RUN set -eux && sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories

RUN apk upgrade -U -a && \
apk add chromium chromium-chromedriver\
&& rm -fr /var/cache/* && \
mkdir /var/cache/apk
RUN apt-get update -y \
&& apt-get install -y fonts-noto-cjk \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/

COPY p2w /usr/local/bin/

RUN cd /usr/local/bin/ && \
chmod +x /usr/local/bin/p2w

# 切换用户,不要使用root!!!
USER betax
RUN chmod +x /usr/local/bin/p2w

EXPOSE 12800

ENTRYPOINT []
CMD [ "p2w","server" ]

0 comments on commit dcd7e01

Please sign in to comment.