Browse Source

Using correct ruby version for docker

Alax Alves 5 years ago
parent
commit
403b3889e5
3 changed files with 3 additions and 17 deletions
  1. 1 1
      README.md
  2. 1 15
      Rakefile
  3. 1 1
      docker-compose.yml

+ 1 - 1
README.md

@@ -376,7 +376,7 @@ bundle exec rake test
 
 or if you'd rather use docker just run:
 ```bash
-docker run -it --name shopify_api -v "$PWD:/shopify_api" -w="/shopify_api" ruby:2.4.6 bundle install
+docker run -it --name shopify_api -v "$PWD:/shopify_api" -w="/shopify_api" ruby:2.6 bundle install
 docker exec -it shopify_api bash
 ```
 

+ 1 - 15
Rakefile

@@ -38,21 +38,7 @@ Rake::RDocTask.new do |rdoc|
   rdoc.rdoc_files.include('lib/**/*.rb')
 end
 
-require 'open-uri'
-def internet_connection?
-  begin
-    true if open("8.8.8.8")
-  rescue
-    false
-  end
-end
-
 task :docker do
   cmd = "docker-compose up -d && docker exec -i -t shopify_api bash"
-  begin
-    system(cmd, err: File::NULL)
-    raise RuntimeError.new("There is no internet connection") unless internet_connection?
-  rescue => e
-    puts e.inspect
-  end
+  exec(cmd, err: File::NULL)
 end

+ 1 - 1
docker-compose.yml

@@ -2,7 +2,7 @@ version: '3.5'
 services:
   api:
     container_name: shopify_api
-    image: ruby:2.4.6
+    image: ruby:2.6
     working_dir: /shopify_api
     volumes:
       - .:/shopify_api