Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

passing env variables in linuxkit #3019

Closed
sandeep510 opened this issue Apr 27, 2018 · 6 comments
Closed

passing env variables in linuxkit #3019

sandeep510 opened this issue Apr 27, 2018 · 6 comments

Comments

@sandeep510
Copy link

sandeep510 commented Apr 27, 2018

I am trying to give postgress and redis env variables to superset. Below is the yml file

- name: superset
    image: ais/superset:0.24
    env:
     - POSTGRES_USER=admin
     - POSTGRES_PASSWORD=user
     - POSTGRES_HOST=abc
     - POSTGRES_PORT=5432
     - POSTGRES_DB=testdb
     - REDIS_HOST=xyz
     - REDIS_PORT=6379
    capabilities:
     - all
    net: host 

** error- superset is not running and log files shows as below

(ns: getty) linuxkit-62971ff7a64d:/var/log# ls -l
total 28
-rw-------    1 root     root             0 Apr 27 00:24 getty.err.log
-rw-------    1 root     root           425 Apr 27 00:24 getty.out.log
-rw-------    1 root     root          3190 Apr 27 00:27 ntpd.err.log
-rw-------    1 root     root             0 Apr 27 00:24 ntpd.out.log
lrwxrwxrwx    1 root     root            15 Apr 27 00:24 onboot -> /run/log/onboot
-rw-------    1 root     root          1201 Apr 27 00:25 postgres.err.log
-rw-------    1 root     root          1944 Apr 27 00:25 postgres.out.log
-rw-------    1 root     root             0 Apr 27 00:24 redis.err.log
-rw-------    1 root     root           890 Apr 27 00:25 redis.out.log
-rw-------    1 root     root            47 Apr 27 00:25 rngd.err.log
-rw-------    1 root     root             0 Apr 27 00:25 rngd.out.log
-rw-------    1 root     root           388 Apr 27 00:25 sshd.err.log
-rw-------    1 root     root             0 Apr 27 00:25 sshd.out.log
-rw-------    1 root     root             0 Apr 27 00:25 superset.err.log
-rw-------    1 root     root             0 Apr 27 00:25 superset.out.log

Am i passing env variables correctly if so is there any way to pass them while running linuxkit run command.

Thanks

@rn
Copy link
Member

rn commented Apr 27, 2018

could you please use triple back-ticks for quoting. The text above is really hard to read (so is the YAML fragment)

@sandeep510
Copy link
Author

yes it is

@ijc
Copy link
Contributor

ijc commented Apr 30, 2018

Unfortunately there is not enough info here for anyone to be able to help.

Please post the full console logs booting the system.

@ijc
Copy link
Contributor

ijc commented May 1, 2018

#3024 suggests you've solved this. closing

@ijc ijc closed this as completed May 1, 2018
@sandeep510
Copy link
Author

Hi,
Is there any specific command in linuxkit to see ENV variables after running linuxkit run?
With env or printenv i am unable to see all my env variables which passed in yml file.

Thanks

@RobbKistler
Copy link
Contributor

@sandeep510 Find the pid of a process in the service's container and cat /proc/<pid>/environ from the console.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants