【发布时间】:2021-10-18 16:01:31
【问题描述】:
Dockerfile:
FROM continuumio/miniconda:latest
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
RUN apt-get --allow-releaseinfo-change update && apt-get upgrade -y && apt-get install -qqy \
wget \
bzip2 \
graphviz \
curl
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - && apt-get install -y nodejs && apt-get install -y npm
RUN mkdir -p /backend
COPY ./backend/requirements.yml /backend/requirements.yml
RUN /opt/conda/bin/conda env create -f /backend/requirements.yml
ENV PATH /opt/conda/envs/dacheting_backend/bin:$PATH
RUN echo "source activate dacheting_backend" >~/.bashrc
RUN mkdir -p /scripts
COPY ./scripts /scripts
RUN chmod +x ./scripts*
COPY ./backend /backend
RUN mkdir -p /frontend
RUN mkdir -p /frontend_tmp
COPY ./frontend /frontend_tmp
WORKDIR frontend_tmp
RUN npm i
RUN npm run build
WORKDIR /backend
当我尝试运行 docker build -t xxxx:latest . 时,出现以下错误:
错误 [3/18] 运行 curl -sL https://deb.nodesource.com/setup_14.x | bash - && apt-get install -y 52.2s ------ 取决于:node-write-file-atomic (>= 2.3~) 但它不会被安装 E: 无法纠正问题,你持有损坏的包。
(我得到了很多其他“取决于:....但它不会是 安装”)
--
我尝试寻找解决方案并使用了不同的方面,但没有任何效果。
【问题讨论】:
标签: node.js docker dockerfile