diff --git a/DockerFile b/DockerFile new file mode 100644 index 0000000000000000000000000000000000000000..bd862c138a3f704ceda84af7b9782b4cef3024b4 --- /dev/null +++ b/DockerFile @@ -0,0 +1,19 @@ +FROM ruby:2.4.2 + +RUN apt-get -y update && apt-get -y upgrade + +ENV LANG C.UTF-8 +ENV LC_ALL C.UTF-8 + +RUN mkdir -p /opt/ruby-starter-kit +WORKDIR /opt/ruby-starter-kit + +ENV HOME /opt/ruby-starter-kit + +RUN echo "gem: --no-rdoc --no-ri" >> ~/.gemrc +RUN gem install bundler + +ADD Gemfile /opt/ruby-starter-kit +ADD Gemfile.lock /opt/ruby-starter-kit + +RUN bundle install -j 4 diff --git a/README.md b/README.md index f57ad88a8b6d8f8d6087c44fe7251d20d96f7e0a..c8e38dcc2aba843752d207c9da604623b663983a 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,8 @@ Place your app-specific code in app/ dir, and utility code that you'd like to ex # Installation * Clone the repo: `git clone https://github.com/artemv/ruby-starter-kit.git my-app` + +## 1 - In your machine * Install Ruby 2.4.1 from https://www.ruby-lang.org/en/downloads/ or via RVM (https://rvm.io/) * Install Bundler and dependencies: ``` @@ -22,6 +24,17 @@ gem install bundler bundle install ``` +## 2 - Using Docker +* Build the Docker Compose: +``` +docker-compose up --build +``` + +* Go inside the docker container: +``` +docker exec -it <docker-image> /bin/bash +``` + Alternatively if you are using Yeoman you can install it using its generator as described [here](https://github.com/artemv/generator-ruby-starter-kit). # Usage diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..6cd58f7239c7df86caa9fcb55146f048331c1ccf --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,9 @@ +version: '3' + +services: + ubuntu: + container_name: ruby-starter-kit + build: . + volumes: + - ${PWD}:/opt/ruby-starter-kit + tty: true