Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switched from ibmcom/db2express-c to ibmcom/db2 #3622

Merged
merged 1 commit into from
Jul 7, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions tests/travis/install-db2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,20 @@ set -ex

echo Setting up IBM DB2

sudo docker pull ibmcom/db2express-c:10.5.0.5-3.10.0
echo "su - db2inst1 -c 'db2 CONNECT TO doctrine && db2 CREATE USER TEMPORARY TABLESPACE doctrine_tbsp PAGESIZE 4 K'" > /tmp/doctrine-init.sh
chmod +x /tmp/doctrine-init.sh

sudo docker run \
-d \
-p 50000:50000 \
-e DB2INST1_PASSWORD=Doctrine2018 \
-e LICENSE=accept \
-e DBNAME=doctrine \
-v /tmp/doctrine-init.sh:/var/custom/doctrine-init.sh:ro \
--name db2 \
ibmcom/db2express-c:10.5.0.5-3.10.0 \
db2start

sleep 15
--privileged=true \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it really necessary to have this flag enabled? Not a big deal but it's usually recommended to give the minimum permissions to the container.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's necessary.

ibmcom/db2:11.5.0.0

sudo docker exec db2 su - db2inst1 -c \
'db2 CREATE DB doctrine && db2 CONNECT TO doctrine && db2 CREATE USER TEMPORARY TABLESPACE doctrine_tbsp PAGESIZE 4 K'
sudo docker logs -f db2 | sed '/(*) Setup has completed./ q'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to use dockerize instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't used it before. What would be the benefit and what would the command look like?

Copy link
Member Author

@morozov morozov Jul 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation says:

To confirm Db2 container is ready, in the logs we will see the message Setup has completed.

While we can ping the container until it's ready, our experience with MySQL shows that often it's not reliable.


echo DB2 started