代码拉取完成,页面将自动刷新
FROM rust:bookworm as rust-builder
RUN mkdir /build
ADD . /build/
WORKDIR /build
RUN mkdir -p .cargo && echo '[source.crates-io]\nreplace-with = "rsproxy-sparse"\n[source.rsproxy-sparse]\nregistry = "sparse+https://rsproxy.cn/index/"' > .cargo/config.toml
RUN ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN cargo build --release
FROM node:bookworm as node-builder
RUN mkdir /build
ADD web /build/
WORKDIR /build
RUN npm config set registry http://registry.npmmirror.com
RUN yarn && yarn build
FROM debian:bookworm
RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list.d/debian.sources
ENV DEBIAN_FRONTEND noninteractive
ENV LANG C.UTF-8
RUN apt-get update -y && apt-get install -y ca-certificates tzdata chromium wget \
fonts-liberation \
fonts-ipafont-gothic \
fonts-noto-cjk \
fonts-roboto \
fonts-noto-color-emoji \
fonts-noto-color-emoji \
fonts-freefont-ttf \
fonts-thai-tlwg \
fonts-indic \
fontconfig x11vnc xvfb scrot
RUN rm -rf /var/cache/* \
&& apt-get -qq clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& rm -Rf /var/cache/apt
# Add Chrome as a user
RUN mkdir -p /app \
&& adduser chrome --home /app\
&& chown -R chrome:chrome /app
RUN ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
# Run Chrome as non-privileged
USER chrome
WORKDIR /app
RUN mkdir -p /app/Downloads && mkdir -p /tmp/browserlify/
ENV CHROME_BIN=/usr/bin/google-chrome \
CHROME_PATH=/opt/google/chrome/
COPY scripts/*.sh /app/
COPY --from=rust-builder /build/target/release/browserlify /app/
COPY --from=node-builder /build/dist /app/dist
ENTRYPOINT [ "/app/entrypoint.sh"]
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。