I'm trying to download a Debian package inside a Ubuntu container as follows:
sudo docker run ubuntu:14.04 wget https://downloads-packages.s3.amazonaws.com/ubuntu-14.04/gitlab_7.8.2-omnibus.1-1_amd64.deb
I get
exec: "wget": executable file not found in $PATH
I've already installed wget
with docker as follows:
run ubuntu:14.04 apt-get install wget
How can I download a file?
Run a Docker Container in Ubuntu In order to create and run a Docker container, first you need to run a command into a downloaded CentOS image, so a basic command would be to check the distribution version file inside the container using cat command, as shown.
Alpine comes with wget implemented in its Busybox multi-call binary.
You can now manage your local Docker instance in a nice friendly GUI. Lets see what Portainer can do for you.. You are able to: Deploy applications via App Templates (Click to Deploy)
You need to install it first. Create a new Dockerfile
, and install wget in it:
FROM ubuntu:14.04 RUN apt-get update \ && apt-get install -y wget \ && rm -rf /var/lib/apt/lists/*
Then, build that image:
docker build -t my-ubuntu .
Finally, run it:
docker run my-ubuntu wget https://downloads-packages.s3.amazonaws.com/ubuntu-14.04/gitlab_7.8.2-omnibus.1-1_amd64.deb
I had this problem recently where apt install wget
does not find anything. As it turns out apt update
was never run.
apt update apt install wget
After discussing this with a coworker we mused that apt update
is likely not run in order to save both time and space in the docker image.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With