Hi,
I was reading a few tutorials and the guidelines for creating a Dockerfile in docker docs. I know about keeping it simple, installing packages, etc…
I am not after the technical solution, I am trying to get the understanding on the approach to be used.
So here we are, say I am trying to create an image using a software which is not available as rpm, so no apt-get, no yum, etc… for that one. In fact one can install it this way: “curl -sSL https://install.pi-hole.net | bash”.
For the sake of the exercice, I used the official docker image for Debian. It has no “curl”, so I had to apt-get it first.
I want to create that image using the Dockerfile. Here is a draft I am making:
FROM debian:8.4
MAINTAINER myemail
RUN apt-get update && apt-get install -y curl _
_ dialog
CMD ["/bin/sh",""]
-
How am I suppose to install that software pihole since the installer will then have some interactive steps? (It will show a text gui and one has to select 2, 3 options). I think option 1 would be to manually connect to the container, run the installer, etc… and then save the image. But I am trying to understand how to do it all using the Dockerfile, or how it fits with the Dockerfile.
-
In the exemple above, I have to get both curl and dialog otherwise the installer will not run.
-
I am not sure what I am supposed to run in the CMD, since I think most important steps are done in the RUN. Once I will run the container, created from that image, it is supposed to have nothing to do but works.
-
Maybe my logic is flawed, maybe there is an official docker image for pihole, and one is supposed to use it as a start, instead of trying to create it. As I said it’s an understanding exercice!
Can you please help me shed some lights on the questions above?
Thanks!