message: Update Dockerfile for quicker builds
diff: @@ -24,8 +24,12 @@ RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
  && apt-get autoremove -y \
  && rm -rf /var/lib/apt/lists/*
  +ARG APP_ENV=production
  +ENV APP_ENV=${APP_ENV}
  +
  ENV WATCHMAN_VERSION 4.7.0
  -RUN cd /tmp \
  +RUN if [ "${APP_ENV}" != "production" ]; then \
  + cd /tmp \
  && git clone https://github.com/facebook/watchman.git \
  && cd watchman \
  && git checkout v$WATCHMAN_VERSION \
  @@ -34,7 +38,8 @@ RUN cd /tmp \
  && make \
  && make install \
  && mv watchman /usr/local/bin/watchman \
  - && rm -Rf /tmp/watchman
  + && rm -Rf /tmp/watchman; \
  + fi
  RUN mkdir -p /code
  WORKDIR /code
  @@ -42,42 +47,14 @@ WORKDIR /code
  COPY ./package.json ./yarn.lock /code/
  RUN yarn --pure-lockfile --ignore-engines
  -COPY ./.bowerrc /code/.bowerrc
  -COPY ./bower.json /code/bower.json
  -RUN ./node_modules/bower/bin/bower install --allow-root --config.interactive=false
  +COPY ./.bowerrc ./bower.json /code/
  +RUN ./node_modules/.bin/bower install --allow-root --config.interactive=false
  COPY ./ /code/
  ARG GIT_COMMIT=
  ENV GIT_COMMIT ${GIT_COMMIT}
  -ARG APP_ENV=production
  -ENV APP_ENV ${APP_ENV}
  -
  -ARG BACKEND=local
  -ENV BACKEND ${BACKEND}
  -
  -ARG OSF_URL=
  -ENV OSF_URL ${OSF_URL}
  -ARG OSF_API_URL=
  -ENV OSF_API_URL ${OSF_API_URL}
  -ARG OSF_RENDER_URL=
  -ENV OSF_RENDER_URL ${OSF_RENDER_URL}
  -ARG OSF_FILE_URL=
  -ENV OSF_FILE_URL ${OSF_FILE_URL}
  -ARG OSF_HELP_URL=
  -ENV OSF_HELP_URL ${OSF_HELP_URL}
  -ARG OSF_COOKIE_LOGIN_URL=
  -ENV OSF_COOKIE_LOGIN_URL ${OSF_COOKIE_LOGIN_URL}
  -ARG OSF_OAUTH_URL=
  -ENV OSF_OAUTH_URL ${OSF_OAUTH_URL}
  -ARG SHARE_BASE_URL=
  -ENV SHARE_BASE_URL ${SHARE_BASE_URL}
  -ARG SHARE_API_URL=
  -ENV SHARE_API_URL ${SHARE_API_URL}
  -ARG SHARE_SEARCH_URL=
  -ENV SHARE_SEARCH_URL ${SHARE_SEARCH_URL}
  -
  -RUN ./node_modules/ember-cli/bin/ember build --env ${APP_ENV}
  +RUN ./node_modules/.bin/ember build --env ${APP_ENV}
  CMD ["yarn", "test"]
  