Hope this is a proper sub for asking this.

disclaimer : Consider me a programming novice, with HTML and limited PHP/CSS experience.

Ive been messing with docker compose, and i’m loving it. Ive also written a small script that i want to dockerize, but i want to use the environment list. What is a proper code for getting the ENV data in your script?

Ive been duckduckgo-ing (doesnt sound like the old days, does it) and i cant figure it out.

  • thomasloven@lemmy.world
    link
    fedilink
    English
    arrow-up
    5
    ·
    1 year ago

    Depends on the language the script is written in. If it’s bash/sh then it’s usually just $VARIABLE

    • cmhe@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      Environment variables isn’t a concept of just docker, but general native app programming. So look into the docs of your language.