-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 \ | ||
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' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it possible to use There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The documentation says:
While we can ping the container until it's ready, our experience with MySQL shows that often it's not reliable. |
||
|
||
echo DB2 started |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's necessary.