Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Update PATH variable #1873

Closed
plispe opened this issue May 23, 2017 · 3 comments
Closed

Update PATH variable #1873

plispe opened this issue May 23, 2017 · 3 comments

Comments

@plispe
Copy link

plispe commented May 23, 2017

RancherOS Version: (1.0.1)

Where are you running RancherOS? (Packet.net)

Is there a way how to extend PATH environment variable? I added /opt/bin directory with some installed utilities, because /opt is persistent path, but I tried to add environment section in cloud config file for various services, but PATH remain the same as default value "/bin:/sbin:/usr/bin:/usr/sbin"

@plispe plispe changed the title Add to PATH variable Update PATH variable May 23, 2017
@SvenDowideit
Copy link
Contributor

I'm going to need to think about this :/ - what services are you trying to get it added to the PATH for?

@Fenikkusu
Copy link

I've just come across this issue myself. I've installed docker-compose into the os and moved it to /opt/bin. I'm using a rancheros install as part of an auto-deploy. That needs to ssh into rancheros and run docker-compose. While I can obviously just put the full path in the ssh command, it's easier in general if I can just add /opt/bin to the paths.

@kingsd041
Copy link
Contributor

Tested with RancherOS v1.2.0-rc2.
There is also a way to extend PATH environment variable, PATH or path can be set, and multiple values can be comma-separated. Note that need to reboot before taking effect.

# sudo ros config set rancher.environment.path /opt/bin,/home/rancher/bin

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants