[英]Golang docker with cloud foundry CLI
I use the following dockerfile and when I build and run it I got error that **unknown command cf**
, I set the env and I expected that when I run cf -v
it will print the version,what it could be ? 我使用以下dockerfile,在构建并运行它时,出现**unknown command cf**
错误,我设置了env,并且我期望当我运行cf -v
,它将打印版本,这可能是什么?
FROM golang:1.10.5
ENV CF_CLI_VERSION "6.40.0"
RUN ln -s /lib/ /lib64
RUN apt-get update && apt-get install curl -y
ENV CF_HOME=/usr/local/bin
RUN curl -L "https://cli.run.pivotal.io/stable?release=linux64-binary&version=${CF_CLI_VERSION}" | tar -zx -C /usr/local/
You probably want to change the last line to 您可能要将最后一行更改为
RUN curl -L "https://cli.run.pivotal.io/stable?release=linux64-binary&version=${CF_CLI_VERSION}" | tar -zx -C /usr/local/bin
/usr/local
is not in the PATH by default /usr/local
默认不在PATH中
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.