Comments on: How to Automatically Build and Configure Custom Docker Images with Dockerfile – Part 3 https://www.tecmint.com/build-and-configure-docker-container-images-with-dockerfile/ Tecmint - Linux Howtos, Tutorials, Guides, News, Tips and Tricks. Thu, 19 Nov 2020 14:39:46 +0000 hourly 1 By: Diego Rebolledo https://www.tecmint.com/build-and-configure-docker-container-images-with-dockerfile/comment-page-1/#comment-1392137 Thu, 19 Nov 2020 14:39:46 +0000 http://www.tecmint.com/?p=18543#comment-1392137 Hi guys, I had an error while installed apache with the docker file, the problem was configuring the timezone, when I selected my TZ, the installation freezing, so I had to add these parameters in the docker file for predefining the TZ in the installation:

ENV TZ=Europe/Berlin

RUN

# ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

I add that in the docker file and it works!!

]]>
By: Paul https://www.tecmint.com/build-and-configure-docker-container-images-with-dockerfile/comment-page-1/#comment-1098984 Mon, 04 Feb 2019 04:54:32 +0000 http://www.tecmint.com/?p=18543#comment-1098984 Thank you for this hands-on Docker tutorial. Worked fine.

In the Dockerfile, had to replace one line with this to avoid a error finding apache2:

# apt-get update && apt-get -y install apache2
]]>
By: Alan https://www.tecmint.com/build-and-configure-docker-container-images-with-dockerfile/comment-page-1/#comment-1064500 Fri, 23 Nov 2018 03:32:27 +0000 http://www.tecmint.com/?p=18543#comment-1064500 Help, years old instructions..

So, i have to hand write a dockerfile, and know what the variables are. So lets just say i followed section 3, the Apache setup, less the mounting external file inside the container, went to follow the instructions to contain it and pump it to AWS/docker service so i need to:

“”docker build -t test .” and i get:

“unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /var/lib/docker/Dockerfile: no such file or directory”

You have a “The following instructions are the most used, some of them being mandatory:”

so: “FROM” is that the base OS? or the encapsulated OS?, and what is it referencing that from since its “Mandatory” i cant just do a “ASDF”? doing a little looking, that’s the container’s OS variant.. so “FROM httpd:2.4” ?

  • “MAINTAINER” is that me? or the AWS user? the OS user? what? not mandatory?
  • “RUN” im guessing thats the commands for the container OS?
  • “CMD” whats this then for? i thought i did that with RUN
  • “ENTRYPOINT” “same as CMD” so i run command thrice?
  • “EXPOSE” is this the same as -P argument? or different string? I don’t know..
  • “ENV” environment variables, any information on that? what are the things I can variate? all I know is “HOME /root”
  • “ADD” so i guess this is null’n’void to me, since CP’ing the files into the container, since I need it self contained..

Can I add “CMD docker cp /media/home/me/Desktop/files.php Container:/var/www/html” ?

Will that pull files from my desktop when “docker build” command runs? or do i have to get a container running then do that manually?

So I am some what surprised this isn’t populated in a file when you get a docker container to run, you’d think it’ll be part of the docker creation process, base stats with the variables, all the other lovely files are created, why not the basic dockerfile? why does it have to be hand written? so many mistakes can be made like that..

and someone explain to me why docker containers have a underline OS? i thought this system used the base OS and plug dependencies though a “firewall” like feature.

Seems like its: BaseOS -> Docker -> Container OS -> Application

looks a lot like a VM process: BaseOS -> VME -> VMOS -> Application

]]>
By: Kiran Vara Prasad https://www.tecmint.com/build-and-configure-docker-container-images-with-dockerfile/comment-page-1/#comment-750491 Sat, 13 Feb 2016 09:49:18 +0000 http://www.tecmint.com/?p=18543#comment-750491 Thank you for the great article Matei Cezar

]]>
By: Matei Cezar https://www.tecmint.com/build-and-configure-docker-container-images-with-dockerfile/comment-page-1/#comment-747948 Thu, 04 Feb 2016 15:03:32 +0000 http://www.tecmint.com/?p=18543#comment-747948 In reply to vignesh.s.

Replace the following variables:
FROM centos
RUN yum -y install httpd
CMD /usr/sbin/apachectl -D FOREGROUND

]]>