1 Star 0 Fork 0

jimmy/browserlify

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Dockerfile.cn 1.64 KB
一键复制 编辑 原始数据 按行查看 历史
jinti 提交于 2024-02-02 17:35 . upadte assets
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"]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Rust
1
https://gitee.com/jimmylau/browserlify.git
git@gitee.com:jimmylau/browserlify.git
jimmylau
browserlify
browserlify
main

搜索帮助

0d507c66 1850385 C8b1a773 1850385