-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
7 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" ] |