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.
I'm now connected to my container after it's created and logged in as root and at the command prompt inside my container.
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: command not found
Not sure why I'm not able to use curl here inside my container.
So I added curl AFTER my docker container was running.
(This was for debugging the container...I did not need a permanent addition)
I ran my image
(the above makes my "app" available on my machine on port 8899) (not important to this question)
Then I listed and created terminal into the running container.
(if the "exec" command above does not work, check this SOF article Error: Cannot Start Container: stat /bin/sh: no such file or directory" )
then I ran
just to prove it existed in the running container
then i ran
and got the below
then i ran curl !
Note, to get "out" of the drilled-in-terminal-window, I had to open a new terminal window and stop the running container
is a big hint, you have to install it with :
Ran in to this same issue while using the CURL command inside my Dockerfile. As Gilles pointed out have to install curl first. These are the commands to be added in the 'Dockerfile'.
It is because there is no package cache in the image, you need to run:
before installing packages, and if your command is in a Dockerfile, you'll then need:
After that install ZSH and GIT Core
Getting zsh to work in ubuntu is weird, since sh does not understand the source command. So, you do this to install zsh
and then you change your shell to zsh
chsh -s
which zsh
and then restartsudo shutdown -r 0 This problem is explained in depth in this issue.