Merge pull request #6639 from okriuchykhin/yarn_fix

Switch to install of yarn from system packages
This commit is contained in:
Martin Artnik 2023-11-14 16:47:54 +01:00 committed by GitHub
commit 09bd5067e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 12 deletions

View file

@ -8,7 +8,6 @@ RUN apt-get update -qq && \
libjemalloc2 \
libssl-dev \
nodejs \
npm \
postgresql-client \
default-jre-headless \
poppler-utils \
@ -21,12 +20,15 @@ RUN apt-get update -qq && \
fonts-wqy-microhei \
fonts-wqy-zenhei \
libfile-mimeinfo-perl \
chromium-driver && \
npm install -g yarn && \
yarn add puppeteer@npm:puppeteer-core && \
chromium-driver \
yarnpkg && \
ln -s /usr/lib/x86_64-linux-gnu/libvips.so.42 /usr/lib/x86_64-linux-gnu/libvips.so && \
rm -rf /var/lib/apt/lists/*
ENV PATH=/usr/share/nodejs/yarn/bin:$PATH
RUN yarn add puppeteer@npm:puppeteer-core
ENV BUNDLE_PATH /usr/local/bundle/
# create app directory

View file

@ -9,14 +9,13 @@ RUN \
apt-get install -y --no-install-recommends \
libssl-dev \
nodejs \
npm \
postgresql-client && \
npm install -g yarn
yarnpkg \
postgresql-client
ENV APP_HOME /usr/src/app
ENV RAILS_ENV=production
ENV GEM_HOME=$APP_HOME/vendor/bundle/ruby/3.2.0
ENV PATH=$GEM_HOME/bin:$PATH
ENV PATH=$GEM_HOME/bin:/usr/share/nodejs/yarn/bin:$PATH
ENV BUNDLE_APP_CONFIG=.bundle
ENV BUNDLE_BUILD__SASSC=--disable-march-tune-native
@ -69,7 +68,7 @@ RUN \
libjemalloc2 \
groff-base \
postgresql-client \
npm \
nodejs \
awscli \
netcat-openbsd \
poppler-utils \
@ -77,9 +76,9 @@ RUN \
libvips42 \
graphviz \
chromium \
libfile-mimeinfo-perl && \
npm install -g yarn && \
yarn add puppeteer@npm:puppeteer-core && \
libfile-mimeinfo-perl \
yarnpkg && \
/usr/share/nodejs/yarn/bin/yarn add puppeteer@npm:puppeteer-core && \
apt-get install -y libreoffice && \
ln -s /usr/lib/x86_64-linux-gnu/libvips.so.42 /usr/lib/x86_64-linux-gnu/libvips.so