WebSphere Application Server & Liberty

WebSphere Application Server & Liberty

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Datasource credentials in IBM Liberty Docker container

    Posted 06/14/22 03:55 PM
    We are migrating to IBM Liberty from IBM ND, created an image based on "22.0.0.5-full-java11-openj9", unable to replace ENV variables while creating the container(docker run -e DB_HOST=xxx), any recommendation?


    ------------------------------
    ram mohan
    ------------------------------


  • 2.  RE: Datasource credentials in IBM Liberty Docker container

    Posted 06/15/22 01:58 AM
    Hi Ram,

    that is interesting, I never experienced such an issue. That said, 
    • what do you mean by replace? DB_HOST should not have a pre-defined value.
    • How do you access those values, and where?
    Keep in mind: If you enter ${my.env.var} in the server.xml file, it looks for environment variables with the following names:
    1. my.env.var

    2. my_env_var

    3. MY_ENV_VAR

    You only need the ${env.} prefix for 19.0.0.3 and earlier.
    HTH,
    Ben

    ------------------------------
    ------------------------------
    Benjamin Marwell
    System Engineer // IBM Champion // Apache Shiro PMC
    Finanz Informatik
    ------------------------------
    ------------------------------



  • 3.  RE: Datasource credentials in IBM Liberty Docker container

    Posted 06/15/22 09:48 AM
    While browsing in the issues, I found this: 
    Environment variables not correctly resolved in server.xml variables · Issue #8298 · OpenLiberty/open-liberty (github.com)

    After checking whether the docs are correct: If they are not, you might want to subscribe to that issue on GitHub.

    ------------------------------
    ------------------------------
    Benjamin Marwell
    System Engineer // IBM Champion // Apache Shiro PMC
    Finanz Informatik
    ------------------------------
    ------------------------------