Public Repository

Last pushed: 25 days ago
Short Description
Meteor container with yarn, run yarn with `meteor yarn`
Full Description

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.:

  • npm
  • yarn

Or just use the one provided from meteor itself e.g.:

  • meteor npm
  • meteor yarn

  • Meteor version

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 | apt-key add -
RUN echo "deb 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 | 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 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${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
Docker Pull Command