Jump to content

Docker Environment Variables passed to Container and using inside a *.conf file


Paul_Ber

Recommended Posts

Passing my variable like this:

bce135bea0bd4e3d9a64fd6016a7e8da.png

 

The variable is passed fine:

[root@939b57ae6d42 config]# echo ${DRIVER}
lis

 

Inside a *conf file:

# The following drivers are supported:
#   bayrad, CFontz, CFontzPacket, curses, CwLnx, ea65, EyeboxOne, g15, glcd,
#   glcdlib, glk, hd44780, icp_a106, imon, imonlcd,, IOWarrior, irman, joy,
#   lb216, lcdm001, lcterm, lirc, lis, MD8800,, mdm166a, ms6931, mtc_s16209x,
#   MtxOrb, mx5000, NoritakeVFD, picolcd,, pyramid, rawserial, sdeclcd,
#   sed1330, sed1520, serialPOS, serialVFD, shuttleVFD, sli,, stv5730, svga,
#   t6963, text, tyan, ula200, vlsys_m428, xosd
Driver=${DRIVER}

 

 

Instead of it being the variable I am getting ${DRIVER}

[root@939b57ae6d42 config]# /usr/bin/LCDd -c /config/LCDd.conf
Could not open driver module /usr/lib/lcdproc/${DRIVER}.so: /usr/lib/lcdproc/${DRIVER}.so: cannot open shared object file: No such file or directory
Driver [${DRIVER}] binding failed
Could not load driver ${DRIVER}
There is no output driver
Critical error while initializing, abort.

 

It has to be something really simple I am missing in the formatting.

Link to comment

Variables in a conf file are not normally processed in Linux, this is not a docker issue.

You could have the conf file edited with the current value of the variable during startup using sed if you really want to be able to set things up this way.

Link to comment

Variables in a conf file are not normally processed in Linux, this is not a docker issue.

You could have the conf file edited with the current value of the variable during startup using sed if you really want to be able to set things up this way.

Thanks I figured it was something like that.

 

 

 

Sent from my XT1563 using Tapatalk

 

 

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...