I'm having more trouble installing Yarn.
Install yarn global on Docker file
In my last question, I found the steps to run after the image is first built but running it fails.
Dockerfile
FROM ruby:2.7.2
SHELL ["/bin/bash", "-c"]
RUN apt-get update -qq &&
apt-get install -y nodejs libvips-tools libsodium-dev
# We need Chromedriver.
# RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - &&
# echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list &&
# apt-get install -y google-chrome-stable &&
# CHROMEVER=$(google-chrome --product-version | grep -o "[^.]*.[^.]*.[^.]*") &&
# DRIVERVER=$(curl -s "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROMEVER") &&
# wget -q --continue -P /chromedriver "http://chromedriver.storage.googleapis.com/$DRIVERVER/chromedriver_linux64.zip" &&
# unzip /chromedriver/chromedriver* -d /chromedriver
# Install all gems first.
# This hits the warm cache if unchanged so bundling is faster.
COPY Gemfile* /tmp/
WORKDIR /tmp
RUN bundle install
WORKDIR /sapco
COPY . /sapco
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - # This line fails
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN apt-get update && apt-get install -y yarn
RUN yarn global add mjml
The error output is:
------
#13 0.362 Warning: apt-key output should not be parsed (stdout is not a terminal)
#13 0.377 gpg: [don't know]: partial length invalid for packet type 63
#13 0.377 gpg: read_block: read error: Invalid packet
#13 0.377 gpg: import from '-' failed: Invalid keyring
------
I was able to run so I don't think it's too related to gpg not working.
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add ```
question from:
https://stackoverflow.com/questions/65875462/installing-yarn-on-docker-file-gpg-dont-know-partial-length-invalid-for-pa 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…