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!!
]]>In the Dockerfile, had to replace one line with this to avoid a error finding apache2:
# apt-get update && apt-get -y install apache2]]>
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” ?
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
]]>Replace the following variables:
FROM centos
RUN yum -y install httpd
CMD /usr/sbin/apachectl -D FOREGROUND