Rails 4.1.7
(https://github.com/jllopis/docker-rails)
$ git clone [email protected]:jllopis/docker-rails.git
$ cd docker-rails
$ docker build t my_user/rails:latest
This image is intended to be used as base image for Ruby+Rails based application containers.
It comes with Rails installed as well as some dependencies.
It does not define a CMD but it defines a default ENTRYPOINT which is a script ADDED from the Dockerfile directory.
If you want to start the image you can do
$ docker run -t -i --entrypoint /bin/bash rails:4.1.7 -l
To build from it, you need in the same directory of this Dockerfile the following:
Also, you should also EXPOSE the ports needed or specify them when the docker run command.
A minimal run.sh script:
#!/usr/bin/env bash
# By: Joan Llopis <[email protected]>
cd $RAILS_APP_ROOT
bundle install
echo "Starting app..."
rails s
Content type
Image
Digest
sha256:2820cf112…
Size
217.8 MB
Last updated
almost 11 years ago
docker pull jllopis/rails:4.1.7