From 07d6304a0ff6f4a856d9c3932e22cf7ac2c3ea9e Mon Sep 17 00:00:00 2001 From: "Rico Sta. Cruz" Date: Sun, 20 Jan 2019 14:11:35 +0800 Subject: [PATCH] Update Docker setup with new Node, Yarn, etc --- Dockerfile | 16 +++++++++------- docker-compose.yml | 2 ++ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 377f14340..997ad584f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,11 @@ -FROM ruby:2.5.1-alpine3.7 -RUN apk update && apk add --no-cache nodejs build-base -RUN apk add yarn --no-cache --repository http://dl-3.alpinelinux.org/alpine/v3.8/community/ --allow-untrusted +FROM ruby:2.5.1 +RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - +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 +RUN apt-get update -qq && apt-get install -qq --no-install-recommends \ + nodejs \ + yarn \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* RUN mkdir -p /app WORKDIR /app -# COPY Gemfile Gemfile.lock ./ -# RUN bundle install -j 4 -# COPY package.json yarn.lock ./ -# RUN yarn diff --git a/docker-compose.yml b/docker-compose.yml index 672d4712b..0fd2a7c41 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,6 +5,7 @@ services: volumes: - .:/app - rubygems:/usr/local/bundle + - node_modules:/app/node_modules ports: - '4001:4001' - '35729:35729' @@ -12,3 +13,4 @@ services: volumes: rubygems: + node_modules: