Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Dockerfile #305

Merged
merged 1 commit into from
Feb 18, 2018
Merged

Update Dockerfile #305

merged 1 commit into from
Feb 18, 2018

Conversation

pocke
Copy link
Contributor

@pocke pocke commented Feb 18, 2018

Problem

The Dockerfile does not work currently. Because the ruby-onbuild image does not work with a gemspec. See docker-library/ruby#22

$ docker build -t geminabox .
Sending build context to Docker daemon  880.1kB
Step 1/4 : FROM ruby:2.3.0-onbuild
 ---> Using cache
 ---> Using cache
 ---> Running in 926fd054cc66

[!] There was an error parsing `Gemfile`: There are no gemspecs at /usr/src/app. Bundler cannot continue.

 #  from /usr/src/app/Gemfile:3
 #  -------------------------------------------
 #
 >  gemspec
 #  group :development do
 #  -------------------------------------------

Solution

Use ruby (without "onbuild") image instead.
The Dockerfile inherits ruby:2.4.3, and the file content bases ruby-onbuild.
https://github.com/docker-library/ruby/blob/a6918175fd506b46bf2d8f899f4faa40e72296fb/2.3/jessie/onbuild/Dockerfile

In the Dockerfile, it copies app files into a docker container before bundle install to avoid the problem.

Note

This change updates Ruby version from 2.3.0 to 2.4.3. I guess 2.4.3 is latest supported version (See https://github.com/geminabox/geminabox/blob/50e0253478b16fa8cc4ea5f88359447ede022869/.travis.yml ).

Problem
====

The Dockerfile does not work currently. Because the ruby-onbuild image does not work with a gemspec. See docker-library/ruby#22

```
$ docker build -t geminabox .
Sending build context to Docker daemon  880.1kB
Step 1/4 : FROM ruby:2.3.0-onbuild
 ---> Using cache
 ---> Using cache
 ---> Running in 926fd054cc66

[!] There was an error parsing `Gemfile`: There are no gemspecs at /usr/src/app. Bundler cannot continue.

 #  from /usr/src/app/Gemfile:3
 #  -------------------------------------------
 #
 >  gemspec
 #  group :development do
 #  -------------------------------------------
```

Solution
====

Use ruby (without "onbuild") image instead.
The `Dockerfile` inherits `ruby:2.4.3`, and the file content bases `ruby-onbuild`.
https://github.com/docker-library/ruby/blob/a6918175fd506b46bf2d8f899f4faa40e72296fb/2.3/jessie/onbuild/Dockerfile

In the `Dockerfile`, it copies app files into a docker container before `bundle install` to avoid the problem.

Note
===

This change updates Ruby version from 2.3.0 to 2.4.3. I guess 2.4.3 is latest supported version (See https://github.com/geminabox/geminabox/blob/50e0253478b16fa8cc4ea5f88359447ede022869/.travis.yml ).
@sonots sonots merged commit 9e69fa7 into geminabox:master Feb 18, 2018
@sonots
Copy link
Member

sonots commented Feb 18, 2018

Thanks!

@pocke pocke deleted the dockerfile branch February 18, 2018 13:14
@tnir tnir mentioned this pull request Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants