Since this application is built as universal react app
, make sure Node.js is installed.
See https://nodejs.org
without hitting internet on every build, good for local dev
ADD docker/yarn.tar.gz /opt/
ENV PATH "$PATH:/opt/yarn-v1.5.1/bin"
need curl files on every build, will set yarn include path automatically
RUN curl -o- -L https://yarnpkg.com/install.sh | bash
ENV PATH "$PATH:$HOME/.yarn/bin"
need modify linux distro's source.list, more complex for example: on
debian
machine
COPY source.list /etc/apt/sources.list
RUN apt-get update && apt-get install -y --no-install-recommends \
apt-utils \
apt-transport-https curl \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends yarn
If you want build from docker image, you should make sure docker
is installed.
For installation details, see: Docker installation