- Let's try to use curl
$ docker run --rm ubuntu:20.04 curl https://code-maven.com/ docker: Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"curl\": executable file not found in $PATH": unknown.
In order to install the curl package in Ubuntu we need to execute the apt-get install -y curl command. (The -y flag is there so apt-get will not ask for confirmation.) However before we can execute that command we need to download the list of all the available packages. We do that by running (here is that word!) the apt-get update command.
We don't have a CMD as we don't have a default operation.
FROM ubuntu:20.04 RUN apt-get update RUN apt-get install -y curl
$ docker build -t mydocker .
$ docker run --rm mydocker curl https://code-maven.com/