Skip to content

Predictia/docker-informix

 
 

Repository files navigation

docker-informix

Debian/Ubuntu based docker container with IBM Informix Dynamic Server.

The Informix Database Server is offered in a number of editions, including free developer editions, editions for small and mid-sized business, and editions supporting the complete feature set and designed to be used in support of the largest enterprise applications. If you are confused which version of Inforix choose use Informix feature description.

Informix is generally considered to be optimized for environments with very low or no database administration, including use as an embedded database. It has a long track record of supporting very high transaction rates and providing uptime characteristics needed for mission critical applications such as manufacturing lines and reservation systems. Informix has been widely deployed in the retail sector, where the low administration overhead makes it useful for in-store deployments.

To use this project you have to download Informix installation files from IBM Informix Download page on your own (registration required).

Recently IBM announced cloud platform called Bluemix. There is no Informix Database Software on IBM Bluemix (there is PostgreSQL, MySQL, MongoDB) so I have created this small project to create Docker container with Informix.

I am not sure that this container is production ready - I am using it for developement and testing.

Building Informix container image (Ubuntu host)

## Remove standard Ubuntu Docker installation and install most recent Docker
sudo apt-get purge docker.io
curl -s https://get.docker.io/ubuntu/ | sudo sh

## Create enviroment for docker-informix container build
git clone https://github.com/0x1fff/docker-informix.git && cd docker-informix

## Download IBM Informix installation files from IBM and copy it
cp /Software/iif.11.50.FC7DE.linux-x86_64.tar .

## Download daemonizer tool
wget https://raw.githubusercontent.com/Predictia/maven-repo/master/releases/es/predictia/daemonizer/0.0.2/daemonizer-0.0.2.jar -O daemonizer.jar

## Build docker image (Dockerfile may require minor changes)
sudo docker build -t docker-informix .

Starting Informix container (Ubuntu host)

Creating Informix with volume and expose it on port 9088

sudo docker run -it -v "/home/informix/data/" -p 9088:9088 --name informix docker-informix

The same as above but create also new empty "test" database

sudo docker run -it -v "/home/informix/data/" -p 9088:9088 --name informix -e DB_USER=test -e DB_PASS=test -e DB_NAME=test docker-informix

Connect to your Informix database

For connecting to Informix Database you can use SQLWorkbench/J with additional JDBC Drivers which are in Informix Bundle or can be downloaded separetly from IBM Informix JDBC Driver Download Page.

JDBC connect string

jdbc:informix-sqli://127.0.0.1:9088/test:INFORMIXSERVER=dev;user=test;password=test;CLIENT_LOCALE=en_US.utf8;DB_LOCALE=en_US.utf8

Available and supported Informix Editions for Docker (x86_64 versions only)

  • 12.10FC4TL - Informix Enterprise Time-Limited Edition for Linux x86_64 (iif.12.10.FC4TL.linux-x86_64.tar)
  • 12.10FC4DE - Informix Developer Edition for Linux x86_64 (iif.12.10.FC4DE.linux-x86_64.tar)
  • 12.10FC4IE - Informix Innovator-C Edition for Linux x86_64 (iif.12.10.FC4IE.linux-x86_64.tar)
  • 11.70FC8DE - Informix Developer Edition for Linux x86_64 (iif.11.70.FC8DE.linux-x86_64.tar)
  • 11.70FC8IE - Informix Innovator-C Edition for Linux x86_64 (iif.11.70.FC8IE.linux-x86_64.tar)
  • 11.50FC9DE - Informix Developer Edition for Linux x86_64 (iif.11.50.FC9DE.linux-x86_64.tar)
Informix Version (x86_64) Ubuntu 14.10 Ubuntu 14.04 Debian 7 (wheezy)
12.10.FC4 Time Limited
12.10.FC4 Innovator Edition
12.10.FC4 Developer Edition
11.70.FC8 Developer Edition
11.70.FC8 Innovator Edition
11.70.FC8 Time Limited

Legend:

  • ✅ - Installation completed succesfully
  • ❌ - Instalation failed
  • 📌 - Notes

Additional notes:

  1. Informix installation script supports only Informix 11.70 and later.

  2. Informix installation script supports only Debian 7 Wheezy and Ubuntu 14.04 LTS+ OS.

  3. It is known that Informix installation script runs smoothly on Ubuntu 13.10, Ubuntu 12.04 but I will not support it officialy. Other versions of Ubuntu (Ubuntu 13.04, Ubuntu 12.10, Ubuntu 10.04) are not working due to end of support from Canoncial.

  4. If your Informix version is released after 11.50FC9DE it will be probably also supported.

For more information about this refer to supported platforms for Informix on IBM website and Ubuntu LTS Release cycle.

How container building looks like

johny@ThinkPad:~/Pulpit/projects/github$ sudo docker build -t docker-informix docker-informix 
Sending build context to Docker daemon 154.6 kB
Sending build context to Docker daemon 
Step 0 : FROM debian:wheezy
 ---> f6fab3b798be
Step 1 : MAINTAINER Tomasz Gaweda
 ---> Running in 94c33b1c5cf3
 ---> 327f8ea65618
Removing intermediate container 94c33b1c5cf3
Step 2 : RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
 ---> Running in 2bd5145f5f0d
 ---> d144b00bcda7
Removing intermediate container 2bd5145f5f0d
Step 3 : ENV http_proxy http://172.17.42.1:8080/
 ---> Running in 0918c5880aca
 ---> 4b1e343d3cdf
Removing intermediate container 0918c5880aca
Step 4 : RUN apt-get update && apt-get -y install wget
 ---> Running in c062c68e30a6
Get:1 http://security.debian.org wheezy/updates Release.gpg [836 B]
Get:2 http://security.debian.org wheezy/updates Release [102 kB]
Get:3 http://http.debian.net wheezy Release.gpg [1655 B]
Get:4 http://http.debian.net wheezy-updates Release.gpg [836 B]
Get:5 http://http.debian.net wheezy Release [168 kB]
Get:6 http://security.debian.org wheezy/updates/main amd64 Packages [287 kB]
...
...
...
Setting up wget (1.13.4-3+deb7u2) ...
###############################################
# IBM Informix Installation script for Debian #
###############################################
>>>    OS version: Debian 7.7
>>>    Linux Kernel version: Linux 064f0e1ce709 3.13.0-43-generic #72-Ubuntu SMP Mon Dec 8 19:35:06 UTC 2014 x86_64 GNU/Linux
>>>    Upgrading OS and installing dependencies for Informix 12.10
Get:1 http://security.debian.org wheezy/updates Release.gpg [836 B]
Get:2 http://security.debian.org wheezy/updates Release [102 kB]
Get:3 http://security.debian.org wheezy/updates/main amd64 Packages [287 kB]
...
...
...
Setting up mksh (40.9.20120630-7) ...
update-alternatives: using /bin/mksh to provide /bin/ksh (ksh) in auto mode
Setting up pdksh (40.9.20120630-7) ...
>>>    Create group and user for Informix
>>>    Uncompress Informix Archive: iif.12.10.FC4DE.linux-x86_64.tar
>>>    Launch silent install ...
...
...
...
>>>    Postconfig onconfig ...
>>>    Postconfig sqlhost ...
>>>    Include tcp support ...
>>>    Create informix user environnement
>>>    Chown Informix binary directory structure
>>>    Create data directory
>>>    Deleting unpacked files
>>>    Deleting downloaded packages
###############################################
#         Installation completed              #
###############################################
 ---> 0882dd952081
Removing intermediate container 101f906ac264
Step 5 : RUN echo "%sudo ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
 ---> Running in c25b3c8037fd
 ---> b4039e0f53c3
Removing intermediate container c25b3c8037fd
Step 6 : VOLUME /home/informix/data
 ---> Running in b3c5b5e5b3e0
 ---> 3fb24892267c
Removing intermediate container b3c5b5e5b3e0
Step 7 : USER informix
 ---> Running in d08eecd141bb
 ---> 5cc434bd8078
Removing intermediate container d08eecd141bb
Step 8 : CMD [ /bin/bash informix_start.sh ; /bin/bash ; /bin/bash informix_stop.sh ]
 ---> Running in 77efa4c00477
 ---> 65982dbe23da
Removing intermediate container 77efa4c00477
Successfully built 65982dbe23da

How does starting container for the first time looks like?

johny@ThinkPad:~/$ sudo docker run -it -v "/home/informix/data/" -p 9088:9088 --name informix -e DB_USER=test -e DB_PASS=test -e DB_NAME=test docker-informix
>>>    Create data directory structure in /home/informix//data/ (ifx initialization)
>>>    Create user "test"...
>>>    Starting up the IBM Informix Database (dev) ... 
*** Startup of dev SUCCESS ***
>>>    Create database "test"...
>>>    Grant DBA to database "test" for user "test"...
IBM Informix Dynamic Server Version 12.10.FC4DE Software Serial Number AAA#B000000
  #################################################
  # Informix container login information:          
  #   database:    test                  
  #   user:        test                  
  #   password:    test                  
  #################################################

IDS-12.10 dev: exit
>>>    Stopping the IBM Informix Database (dev) ... 
*** Shutdown of dev SUCCESS ***

How does resuming stopped container looks like?

johny@ThinkPad:~/$ docker ps -a
CONTAINER ID        IMAGE                    COMMAND                CREATED             STATUS                     PORTS               NAMES
c7cc39dd2e7f        docker-informix:latest   "/bin/sh -c '/bin/ba   5 minutes ago       Exited (0) 2 seconds ago                       informix           


johny@ThinkPad:~/$ docker start -ai c7cc39dd2e7f
>>>    Starting up the IBM Informix Database (dev) ... 
*** Startup of dev SUCCESS ***
IBM Informix Dynamic Server Version 12.10.FC4DE Software Serial Number AAA#B000000
  #################################################
  # Informix container login information:          
  #   database:    test                  
  #   user:        test                  
  #   password:    test                  
  #################################################

IDS-12.10 dev: exit
>>>    Stopping up the IBM Informix Database (dev) ... 
*** Shutdown of dev SUCCESS ***

Is docker-informix container ready for production use?

This Dockerfile is created with "best practices" in mind but if you would like to deploy it as production you should read more about "data only container pattern" and docker volumes from this links 1, 2, 3, 4.

If you are planing to run it on production you should also change configuration of Informix Database - now it is almost default. For more informations please refer to Informix Innovator-C - quick start guide.

What is missing in this repository

  • Perl, PHP, Python bindings
  • Various tools from IIDUG (alternatives for default IBM tools)

Informix tools which may be usefull but are not installed by default

Additional references

License:

License Apache License Version 2.0, January 2004 (https://tldrlegal.com/ ; http://choosealicense.com/)

About

Docker container for IBM Informix Dynamic Server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%