Skip to content

Commit

Permalink
Add a Dockerfile for CUBRID 9.2.26.0004.
Browse files Browse the repository at this point in the history
  • Loading branch information
kadishmal committed Sep 28, 2016
1 parent edb872e commit e846bf7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 14 deletions.
12 changes: 3 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ ENV CUBRID=/opt/$CUBRID_USER
ENV CUBRID_DATABASES=$CUBRID/databases
ENV CUBRID_LOGS=$CUBRID/log
ENV CUBRID_CHARSET=en_US
ENV CUBRID_VERSION=9.1.0
ENV CUBRID_PATCH_NUMBER=0218
ENV CUBRID_VERSION=9.2.26
ENV CUBRID_PATCH_NUMBER=0004
ENV LD_LIBRARY_PATH=$CUBRID/lib
ENV PATH=$CUBRID/bin:$PATH

RUN rpm -ivh http://ftp.cubrid.org/CUBRID_Engine/$CUBRID_VERSION/Linux/cubrid-$CUBRID_VERSION.$CUBRID_PATCH_NUMBER-el5.x86_64.rpm
RUN rpm -ivh http://ftp.cubrid.org/CUBRID_Engine/$CUBRID_VERSION/cubrid-$CUBRID_VERSION.$CUBRID_PATCH_NUMBER-el5.x86_64.rpm

# Switch to `cubrid` user.
USER $CUBRID_USER
Expand All @@ -25,12 +25,6 @@ ADD create-start-demodb.sh $CUBRID

EXPOSE 33000 30000 8001 8002 1523

# CUBRID 9.1.0 comes with Web Manager enabled which fails to
# start up because it requires "root" user, but CUBRID requires
# "cubrid" user. Conflicting. So disabled Web Manager in
# CUBRID Manager configuration file.
RUN sed -i 's/support_web_manager=YES/support_web_manager=NO/' conf/cm.conf

# `tail -f /dev/null` trick is to keep the foreground process always ON.
# Otherwise, the `cubrid` command quits as soon as it successfully
# starts up all the necessary services.
Expand Down
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ CUBRID (/ˈkjuːbrɪd/ "cube-rid") is an open source SQL-based relational databa

## How to use this image

docker run -p 33000:33000 --name cubrid lighthopper/cubrid:9.2.3.0005
docker run -p 33000:33000 --name cubrid lighthopper/cubrid:9.2.26.0004

The image has a default command:

Expand All @@ -15,14 +15,14 @@ The image has a default command:
It will start CUBRID Service and tail all its logs. You may override this command
as follows:

docker run -p 33000:33000 --name cubrid lighthopper/cubrid:9.2.3.0005 cubrid service start
docker run -p 33000:33000 --name cubrid lighthopper/cubrid:9.2.26.0004 cubrid service start

This, for instance, will start the Service but will not tail log files.

Another alternative command is to create and start the `demodb` database distributed
together with CUBRID.

docker run -p 33000:33000 --name cubrid lighthopper/cubrid:9.2.3.0005 ./create-start-demodb.sh
docker run -p 33000:33000 --name cubrid lighthopper/cubrid:9.2.26.0004 ./create-start-demodb.sh

Or in case CUBRID is already running in a `cubrid` container:

Expand All @@ -32,14 +32,17 @@ Or in case CUBRID is already running in a `cubrid` container:

The following versions are available via tags.

- 9.2.26.0004
- 9.2.3.0005
- 9.1.0.0218
- 9.0.0.0478
- 8.4.3.10001
- 8.4.1.32003

All these images are based on CentOS 6.6.

## How to build this image:

docker build -t="lighthopper/cubrid:9.2.3.0005" .
docker build -t="lighthopper/cubrid:9.2.26.0004" .

The CUBRID binary will be retrieved on build from http://ftp.cubrid.org/CUBRID_Engine/.
2 changes: 1 addition & 1 deletion create-start-demodb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
cd $CUBRID_DATABASES
mkdir demodb
cd demodb
cubrid createdb --db-volume-size=64M --log-volume-size=64M demodb
cubrid createdb --db-volume-size=64M --log-volume-size=64M demodb en_US.utf8
cubrid loaddb -u dba -s $CUBRID/demo/demodb_schema -d $CUBRID/demo/demodb_objects demodb
# Auto start "demodb" database when the server is started.
# `-e` instructs not to escape special characters.
Expand Down

0 comments on commit e846bf7

Please sign in to comment.