Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

$PATH is not passed #754

Closed
prary opened this issue Aug 28, 2019 · 5 comments
Closed

$PATH is not passed #754

prary opened this issue Aug 28, 2019 · 5 comments

Comments

@prary
Copy link
Contributor

prary commented Aug 28, 2019

Actual behavior
Dockerfile

FROM something/lrh7
RUN env

Do a docker build, output shows

Step 2/3 : RUN env
 ---> Running in a7ea3e88b5a6

HOSTNAME=a7ea3e88b5a6
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PWD=/
SHLVL=1
HOME=/root
_=/usr/bin/env

Do skaffold build -v=debug

INFO[0025] RUN env
INFO[0025] cmd: /bin/sh
INFO[0025] args: [-c env]
PWD=/
SHLVL=1
HOME=/root
_=/usr/bin/env

Expected behavior
Path variable should be retained

@tejal29
Copy link
Member

tejal29 commented Aug 28, 2019

can you try

docker run -it something/lrh7  env

and see if the PATH variable is set?

@prary
Copy link
Contributor Author

prary commented Aug 28, 2019

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOSTNAME=34fbfd2c2006
TERM=xterm
HOME=/root

@prary
Copy link
Contributor Author

prary commented Aug 28, 2019

If we do echo $PATH then

INFO[0021] RUN echo $PATH
INFO[0021] cmd: /bin/sh
INFO[0021] args: [-c echo $PATH]
/usr/local/bin:/usr/bin

Don't know from where this $PATH is coming

@fspaniol
Copy link

Related: #748

@prary
Copy link
Contributor Author

prary commented Aug 30, 2019

We should set the default path if $PATH isnt defined in base image

if img == empty.Image {

Should remove this condition

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

No branches or pull requests

3 participants