无法在我的Docker容器中运行Curl命令 [英] Can't run Curl command inside my Docker Container
问题描述
我从OS X VM Docker主机创建了一个Docker容器。我使用run命令创建了它,并基于docker hub上的 ubuntu:xenial
镜像创建了容器。
I created a docker container from my OS X VM Docker host. I created it using the run command and created the container based off the ubuntu:xenial
image off docker hub.
创建容器并以root用户身份登录并在容器内的命令提示符下登录容器后。
I'm now connected to my container after it's created and logged in as root and at the command prompt inside my container.
我尝试安装自制软件,由于某种原因,我无法运行命令来安装Homebrew:
I tried to install homebrew and for some reason, I can't run the command to install Homebrew:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
当我跑步时我得到了重击:
when I run that I get a bash:
curl:未找到命令
curl: command not found
不知道为什么我不能在容器中使用curl。
Not sure why I'm not able to use curl here inside my container.
推荐答案
curl :找不到命令
curl: command not found
是一个大提示,您必须使用:
is a big hint, you have to install it with :
apt-get update; apt-get install curl
这篇关于无法在我的Docker容器中运行Curl命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!