|
| 1 | +# Guide |
| 2 | + |
| 3 | +Run the commands |
| 4 | +``` |
| 5 | +# download the image |
| 6 | +docker pull ibmcom/informix-developer-database:latest |
| 7 | +
|
| 8 | +# run the informix image |
| 9 | +docker run -it --name iif_developer_edition --privileged -p 9088:9088 -p 9089:9089 -p 27017:27017 -p 27018:27018 -p 27883:27883 -e LICENSE=accept ibmcom/informix-developer-database:latest |
| 10 | +``` |
| 11 | + |
| 12 | +Copy the following files to the container: |
| 13 | +* apache-ant-1.9.8-bin.tar.gz - download it from http://mirrors.cnnic.cn/apache//ant/binaries/apache-ant-1.9.8-bin.tar.gz |
| 14 | +* files/ant-libs.tgz - it will extracted to apache-ant |
| 15 | +* tc-database-scripts - download it from https://github.com/appirio-tech/tc-database-scripts |
| 16 | +* files/build.properties - it will be copied to tc-database-scripts |
| 17 | + |
| 18 | +You can use command like `docker cp {file} iif_developer_edition:/` to copy files to the root of the container, where {file} is the file or directory above. |
| 19 | + |
| 20 | +Now log into the container with command `docker exec -it iif_developer_edition bash`, and execute the following commands in the container: |
| 21 | +''' |
| 22 | +# install jdk |
| 23 | +sudo apt-get update |
| 24 | +sudo apt-get install -y openjdk-7-jdk |
| 25 | + |
| 26 | +# extract apache-ant to /opt |
| 27 | +tar -xzvf apache-ant-1.9.8-bin.tar.gz -C /opt |
| 28 | + |
| 29 | +# extract the ant-libs to apache-ant's lib directory |
| 30 | +tar -xzvf /ant-libs.tgz -C /opt/apache-ant-1.9.8/lib |
| 31 | + |
| 32 | +# create 4G datadbs dbspace |
| 33 | +touch /home/informix/data/spaces/datadbs.000 |
| 34 | +chmod 660 /home/informix/data/spaces/datadbs.000 |
| 35 | +onspaces -c -d datadbs -p /home/informix/data/spaces/datadbs.000 -o 0 -s 4194304 |
| 36 | + |
| 37 | +# copy the build.properties to tc-database-scripts |
| 38 | +cp /build.properties /tc-database-scripts |
| 39 | + |
| 40 | +# copy the tc-database-scripts/connfile.sql.example as connfile.sql |
| 41 | +cp /tc-database-scripts/connfile.sql.example /tc-database-scripts/connfile.sql |
| 42 | + |
| 43 | +# go to tc-database-scripts directory and setup db |
| 44 | +cd /tc-database-scripts |
| 45 | +/opt/apache-ant-1.9.8/bin/ant setup_db |
| 46 | +''' |
0 commit comments