Meteor container with yarn, run yarn with `meteor yarn`
1.4K
This image provides the latest npm & yarn in sync with meteor releases.
Since running meteor npm / meteor yarn has a slight overhead you can run yarn & npm from the systems path e.g.:
npmyarnOr just use the one provided from meteor itself e.g.:
meteor npm
meteor yarn
Meteor version 1.6.1.1
FROM ubuntu:18.04
ARG DEBIAN_FRONTEND=noninteractive
# global dependencies
RUN apt update && apt upgrade -y \
&& apt install -y -qq curl apt-transport-https git-core gnupg
# prepare yarn repo
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
# install node & npm
# install yarn globally to install npm packages faster (tm)
# this runs apt update after setting up already
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
RUN apt update && apt install -y -qq yarn nodejs
RUN npm i -g npm@latest
# cleanup
RUN apt clean && \
rm -rf /var/lib/apt/lists
# meteor installation env
ENV METEOR_RELEASE 1.6.1.1
ENV METEOR_ALLOW_SUPERUSER true
ENV user meteor
# add local user to do privilege separation
RUN useradd $user && mkdir /home/$user && chown $user:$user /home/$user -R
WORKDIR /home/$user
RUN su $user -c "curl https://install.meteor.com/?release=${METEOR_RELEASE} | sh"
RUN ls /home/meteor/.meteor/packages/meteor-tool
RUN cp /home/meteor/.meteor/packages/meteor-tool/*/mt-os.linux.x86_64/scripts/admin/launch-meteor /usr/bin/meteor
RUN chown $user /home/meteor/.meteor -R
RUN mkdir /source /build && chown $user /source /build
USER $user
# install latest yarn and npm in meteor distribution globally too, so you can run `meteor yarn`
RUN meteor npm i -g yarn@latest npm@latest
RUN meteor node --version
RUN node --version
RUN npm --version
WORKDIR /source
CMD meteor
Content type
Image
Digest
Size
340.5 MB
Last updated
over 8 years ago
docker pull linguala/meteor-yarn