dist contains ready-to-build dockerfiles.
- rails/pure An Apache/Passenger/Rails image
- rails/nodejs An Apache/Passenger/Rails/nodejs image
- rails/sphinx An Apache/Passenger/Rails/sphinx image
- rails/sphinx-transifex An Apache/Passenger/Rails/sphinx/transifex image
All these images are built on Dockerhub.
The ruby 2.2 images are organized in two branches, master
and stable
.
master
contains release candidates ready for integration testing.
The stable
branch contains the images used in production environments.
Each Dockerfile is released on it's own DockerHub repository:
- dist/rails/pure/Dockerfile is built to puzzle/ose3-rails:ruby22*
- dist/rails/sphinx/Dockerfile (includes Sphinx 2.2) is built to puzzle/ose3-rails-sphinx:ruby22*
- dist/rails/sphinx/transifex/Dockerfile (includes Sphinx transifex client 0.12) is built to puzzle/ose3-rails-sphinx:ruby22*
- dist/rails/nodejs/Dockerfile (includes node 8.9) is built to puzzle/ose3-rails-nodejs:ruby22,puzzle/ose3-rails-nodejs:ruby22-nodejs-8.9
- dist/rails/nodejs/nodejs6/Dockerfile (includes node 6) is built to puzzle/ose3-rails-nodejs:ruby22-nodejs-6
There are more docker tags in place so you can pin your image to the versions of the software contained inside. Have a look at DockerHub.
Tags ending in -dev
are the builds from the master
branch used for integration tests.
Change to the desired Dockerfiles' containing folder and docker build .
Sample spec
section of your BuildConfig
:
source:
type: "Git"
git:
uri: "<this repos' uri>"
ref: "master"
contextDir: "<e.g. dist/rails/pure>"
Dockerfiles and build contexts under dist
are generated from the source files at src
.
Use ruby 2.3.1 (although everything > 2 should work), rvm will do so for you automatically.
rvm use 2.3.1
gem install bundler
bundle install
rake build
src
contains ERB templates to build the Dockerfiles and the necessary files for their build contexts.
src
├── _build
│ └── (The build script)
└── rails (Collection of images)
├── _context (Contains files and folders to copy to build context)
├── _partials (Contains partials)
├── pure (An image)
│ ├── Dockerfile.erb
│ └── README.md.erb
└── nodejs (Another image)
├── _context (nodejs specific build context contents)
An example: When building nodejs
dist/rails/nodejs/Dockerfile
is generated fromsrc/rails/nodejs/Dockerfile.erb
The template has access to all partials innodejs/_partials
and all parent folders (rails/_partials
in this case). A partial_foo.erb
is rendered by doing<%= partial("foo") %>
.nodejs/_partials/_foo.erb
will take precedence overrails/_partials/_foo.erb
.- All necessary files for the docker build context (store them in the
_context
folders) are copied todist/rails/nodejs/
. A filenodejs/foofile
will overriderails/foofile
.
Check out bin/test.sh
for a simple integration test.
For now, only Puzzle members may release new versions of the images.
Refer to the internal documentation at puzzle to learn how to test the image against a fow OpenShift projects before releasing it on DockerHub.
- There are various development tasks.