-1

I have a docker image that i have created from a custom dockerfile.

Now i want to install another program on it, that is installed through downloading and then running a .sh file.

I have already curl on the dockerfile and while i know how to download a file with curl in my system, i am not sure if the downloading and installation is the same inside docker - from a dockerfile.

Do i need to download it to a specific directory and do i have to delete it afterwards?

user1584421
  • 3,499
  • 11
  • 46
  • 86

2 Answers2

1

Looking similar to this Run a script in Dockerfile .You can install package using bootstrap scripts and include clean up process if any.

pradz_stack
  • 176
  • 1
  • 11
1

Inside the Docker container mostly same as your operating system, but some of the Docker images doesn't include all the abilities that you can use in your operating system. For example; nano, curl etc. might not work at the beginning, depending on the image. If thats not the case, you can use your container like your operating system. There is no difference.

However, if you want to control the flow, downloaded files etc. you can link a volume between a directory in your operating system and a directory inside the Docker container. After that when you change, add, remove a file in that directory, it will change in your container aswell.

Eagleclaw
  • 369
  • 1
  • 13