Sometime, I want to check what are there in Bluemix application container. There is simple way to take a look at the inside Bluemix container image.
The output of “cf stacks” command returns “lucid64” which is build from Cloud Foundry stacks project ( https://github.com/cloudfoundry/stacks ). Here is how I build the lucid64. I’ve installed VirtualBox and Vagrant as well as Cygwin (with several necessary environment such as Ruby, g++, libcrypt-devel, etc) in advance.
$ git clone https://github.com/cloudfoundry/stacks.git
$ cd stacks
$ gem install bundler
It takes a while, since Vagrant try to download OS image. Then, I run build_stack command as follows:
This command created the rootfs for container in /tmp/warden/rootfs. Now, I can go through most of file systems (except /proc) and commands available in Bluemix application container image.
For example, I was able to find “perl” command.
$ export LC_ALL=POSIX
$ sudo chroot /tmp/warden/rootfs
# /usr/bin/perl -version
This is perl, v5.10.1 (*) built for x86_64-linux-gnu-thread-multi
Since the rootfs image is built using Ubuntu lucid image, there is no wonder that I can use “perl” because this is default package in the release ( http://releases.ubuntu.com/releases/lucid/ )
In addition to the default packages, stack build process add several additional packages described in “build” script of stacks ( https://raw.githubusercontent.com/cloudfoundry/stacks/master/lucid64/build ).
The list contains package like “imagemagick”. So this means, the Bluemix application can utilize the image conversion library in various languages. Of course, the application should be able to run Perl codes at server-side.
If you wonder what commands and libraries are available for you to build wonderful Bluemix application, it may be worthwhile to take a look at actual image.