Skip to content

Commit

Permalink
cmpression image
Browse files Browse the repository at this point in the history
  • Loading branch information
skye-z committed Feb 28, 2024
1 parent 5452053 commit 4ad29a6
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 4ad29a6

Please sign in to comment.