Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'd like to be able to run Ginatra via Docker and instead of just creating my own I figured it would be good to have an 'official' Ginatra image on the Docker Hub Registry.
Docker needs the app to run in the foreground and I also wanted to be able to set the port the app runs on by passing Docker an environment variable. This is the reasoning behind adding Puma in order to serve the app rather than using the built-in
bin/ginatra run
. I added it directly to the Gemfile as I didn't want to mess with your gemspec and it technically isn't a dependency. I'm sure there is a better way to achieve the same result.The image it creates seems excessively large at 911MB however the official Ruby image that it is based upon is 830MB so I think this is a problem with that image and should be addressed there.
If you are unfamiliar with Docker you can build the image like so:
Docker Hub will automate and do the builds for you once setup.
In order to run the built image with a custom
config.yml
you can do:You could also pass that command
-e GINATRA_PORT=8080
if you wanted to set a different port for Ginatra to run on.