Download Dockerfile from linuxrun/deer: direct link, hf CLI and curl.
- Browser
- Download file 1.71 kB
-
https://huggingface.co/spaces/linuxrun/deer/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/linuxrun/deer/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/linuxrun/deer/resolve/main/Dockerfile
1.71 kB
| FROM node:16 | |
| WORKDIR /tmp | |
| RUN echo "deb [check-valid-until=no] http://archive.debian.org/debian buster main contrib non-free" > /etc/apt/sources.list && \ | |
| echo "deb [check-valid-until=no] http://archive.debian.org/debian buster-updates main contrib non-free" >> /etc/apt/sources.list && \ | |
| echo "deb [check-valid-until=no] http://archive.debian.org/debian-security buster/updates main contrib non-free" >> /etc/apt/sources.list && \ | |
| apt-get -o Acquire::Check-Valid-Until=false update && \ | |
| apt-get install -y --no-install-recommends apt-utils && \ | |
| apt-get install -y \ | |
| wget gnupg fonts-noto-cjk libxss1 \ | |
| fonts-liberation libasound2 libatk-bridge2.0-0 libatspi2.0-0 libdrm2 \ | |
| libgbm1 libgtk-3-0 libnspr4 libnss3 libx11-xcb1 libxkbcommon0 xdg-utils \ | |
| libu2f-udev libvulkan1 \ | |
| --no-install-recommends && \ | |
| rm -rf /var/lib/apt/lists/* | |
| RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | |
| RUN apt-get install ./google-chrome-stable_current_amd64.deb | |
| WORKDIR /app | |
| # 原步骤: | |
| # COPY server/package.json ./ | |
| # COPY server/yarn.lock ./ | |
| # RUN yarn | |
| # 修改后: | |
| COPY server/package.json ./ | |
| COPY server/yarn.lock ./ | |
| # 切换到新的npmmirror镜像源(解决证书过期问题) | |
| # 关键步骤:替换yarn.lock中硬编码的旧镜像源地址 | |
| RUN sed -i 's#https://registry.npm.taobao.org#https://registry.npmmirror.com#g' yarn.lock && \ | |
| # 确认全局registry配置 | |
| yarn config set registry https://registry.npmmirror.com && \ | |
| # 安装依赖 | |
| yarn | |
| RUN yarn | |
| COPY ./server ./ | |
| COPY ./client/build/*.js ./public/static/js/ | |
| COPY ./client/build/*.css ./public/static/css/ | |
| ENTRYPOINT ["node", "src/index.js"] | |