1 Star 0 Fork 0

宇宙蒙面侠X/alpine-chrome

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile 1.61 KB
一键复制 编辑 原始数据 按行查看 历史
FROM alpine:latest
ARG BUILD_DATE
ARG VCS_REF
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.description="Chrome running in headless mode in a tiny Alpine image" \
org.label-schema.name="alpine-chrome" \
org.label-schema.schema-version="1.0.0-rc1" \
org.label-schema.usage="https://github.com/Zenika/alpine-chrome/blob/master/README.md" \
org.label-schema.vcs-url="https://github.com/Zenika/alpine-chrome" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vendor="Zenika" \
org.label-schema.version="latest"
# Installs latest Chromium package.
RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/main" > /etc/apk/repositories \
&& echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \
&& echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
&& echo "http://dl-cdn.alpinelinux.org/alpine/v3.12/main" >> /etc/apk/repositories \
&& apk upgrade -U -a \
&& apk add \
libstdc++ \
chromium \
harfbuzz \
nss \
freetype \
ttf-freefont \
font-noto-emoji \
wqy-zenhei \
&& rm -rf /var/cache/* \
&& mkdir /var/cache/apk
COPY local.conf /etc/fonts/local.conf
# Add Chrome as a user
RUN mkdir -p /usr/src/app \
&& adduser -D chrome \
&& chown -R chrome:chrome /usr/src/app
# Run Chrome as non-privileged
USER chrome
WORKDIR /usr/src/app
ENV CHROME_BIN=/usr/bin/chromium-browser \
CHROME_PATH=/usr/lib/chromium/
# Autorun chrome headless
ENTRYPOINT ["chromium-browser", "--headless", "--use-gl=swiftshader", "--disable-software-rasterizer", "--disable-dev-shm-usage"]
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/awol2010ex/alpine-chrome.git
git@gitee.com:awol2010ex/alpine-chrome.git
awol2010ex
alpine-chrome
alpine-chrome
master

搜索帮助