WebSphere Application Server & Liberty

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

    Posted Tue June 14, 2022 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

    IBM Champion
    Posted Wed June 15, 2022 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

    IBM Champion
    Posted Wed June 15, 2022 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
    ------------------------------
    ------------------------------