Can't run Curl command inside my Docker Container

后端 未结 6 1292
谎友^
谎友^ 2020-12-13 08:01

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 do

6条回答
  •  再見小時候
    2020-12-13 08:50

    You don't need to install curl to download the file into Docker container, use ADD command, e.g.

    ADD https://raw.githubusercontent.com/Homebrew/install/master/install /tmp
    RUN ruby -e /tmp/install
    

    Note: Add above lines to your Dockerfile file.


    Another example which installs Azure CLI:

    ADD https://aka.ms/InstallAzureCLIDeb /tmp
    RUN bash /tmp/InstallAzureCLIDeb
    

提交回复
热议问题