我正在尝试将Yarn安装到从dockerfile构建的容器中:
FROM php:7.4-fpm
...
// install node
RUN echo "deb https://deb.nodesource.com/node_6.x jessie main" >> /etc/apt/sources.list.d/nodejs.list && \
wget -nv -O - https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
echo "deb-src https://deb.nodesource.com/node_6.x jessie main" >> /etc/apt/sources.list.d/nodejs.list && \
apt-get update && \
apt-get install -y --force-yes nodejs && \
rm -f /etc/apt/sources.list.d/nodejs.list
// install yarn
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=DontWarn apt-key add - && \
echo "deb http://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
apt-get update && \
apt-get install --no-install-recommends yarn
然后,在容器内:
yarn --version
0.32+git
当我尝试运行Yarn安装时,出现错误
1条答案
按热度按时间ctehm74n1#
对于Yarn,请尝试以下操作:
对于节点i,建议如下: