Db2 On Premise and Cloud

 View Only
  • 1.  Docker Compose ?

    Posted Mon May 09, 2022 09:20 AM
    I am able to start a DB2 docker container using the suggested "docker run" command without any problems. However when I try to create docker-compose file it generates an error during dbstart when executing the command "mount -o remount,suid ${STORAGE_DIR?}" on line 105 of "/var/db2_setup/lib/setup_db2_instance.sh"

    Does anyone have a working docker-compose.yaml for this image ?

    ```
    version: "3.3"
    services:

    # docker run -itd --name DB2TEST --privileged=true -p 50001:50000 -e LICENSE=accept -e DB2INST1_PASSWORD=oracle -e DBNAME=yadamu -v DB2TEST_DATA:/database ibmcom/db2
    IBMDB2-01:
    container_name: IBMDB2-01
    image: ibmcom/db2
    security_opt:
    - label:disable
    privileged: true
    mem_limit: '12gb'
    shm_size: '4gb'
    networks:
    - YADAMU-NET
    ports:
    - 50000:50000
    environment:
    DBNAME: YADAMU
    DB2INST1_PASSWORD : oracle
    SAMPLEDB : "true"
    LICENSE: "accept"
    volumes:
    - YADAMU_01-SHARED:/mnt/shared
    - IBMDB2-01-DATA:/database

    restart: always

    volumes:
    YADAMU_01-SHARED:
    name: YADAMU_01-SHARED
    IBMDB2-01-DATA:

    networks:
    YADAMU-NET:
    name: YADAMU-NET
    ```





    ------------------------------
    Mark Drake
    ------------------------------


  • 2.  RE: Docker Compose ?

    Posted Sat May 14, 2022 10:54 PM
    For some reason i was able to get this to work by creating my own clone of IBCOM/DB2 using the following docker file

    FROM ibmcom/db2

    and then creating a local mage using docker build. I was then able to use the above dockerfile simply replacing the reference to ibmcom/db2 with the tag I used when building from my dockerfile... I wish IMB published thier dockerfile somewhere

    ------------------------------
    Mark Drake
    ------------------------------