Partner links

Containerize your Ruby on Rails/PostgreSQL application with RHSCL Docker images

Docker Containers

Editor: RHSCL is Red Hat Software Collections, a subscription-based suite of tools available to Red Hat’s customers that make it possible to build and install multiple versions of the same software components on your system. A future article will show how to do the same on Fedora.

New RHSCL-based Docker images that are now in beta let you easily build your own application containers even without writing any Dockerfiles. Here is an example of a Ruby on Rails application built with the Ruby 2.2 image using the PostgreSQL 9.4 image as a database backend.

For building the application image we will use a tool called source-to-image (s2i, formally sti) which is a program that can build your application image on top of s2i images. For example the latest version of OpenShift uses s2i images to run your applications as well and you can use them with source-to-image to containerize your own applications locally.
Prerequisites

In this blog post I assume you are running RHEL 7 and you have the latest Docker from rhel-7-server-extras-rpms channel and that you enabled rhel-server-rhscl-7-beta-rpms channel for getting the source-to-image tool.

If you did not, run:

# Uncommented lines are commands you must run
# 1. Add Extras repo
sudo subscription-manager repos --enable=rhel-7-server-extras-rpms

# 2. Enable testing repos
sudo subscription-manager repos --enable=rhel-server-rhscl-7-beta-rpms

# 3. Install the image
sudo yum install -y docker source-to-image

#

Continue to Red Hat Developer Blog to read the complete article.

Docker Containers

Share:

Facebook
Twitter
Pinterest
LinkedIn

Partner links

Newsletter: Subscribe for updates

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments

Get the latest

On social media

Security distros

Hacker
Linux distros for hacking and pentesting

Crypto mining OS

Bitcoin
Distros for mining bitcoin and other cryptocurrencies

Crypto hardware

MSI GeForce GTX 1070
Installing Nvidia GTX 1070 GPU drivers on Ubuntu

Disk guide

LVM
Beginner's guide to disks & disk partitions in Linux

Bash guide

Bash shell terminal
How to set the PATH variable in Bash
Categories
Archives
0
Hya, what do you think? Please comment.x
()
x