This thing is really strange... If I build a docker image using the following docker file I receive the error
#TO BE FINISHED
FROM httpd:2.4
COPY / /usr/local/apache2/htdocs/operator
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY ./config/my-httpd.conf /usr/local/apache2/conf/httpd.conf
EXPOSE 80
For a simple test I've just taken the one from the bulk container of httpd:2.4 and replaced it inside my config/my-httpd.config but still give me an error.
If I comment on the #COPY it works.. but what it's not clear to me is why... it's the same that are contained in the official httpd image
I forgot to say that I'm using Docker for windows Desktop application and I'm in linux mode
What am I doing wrong?
I've understood that the problem is the http.d file size... I try to explain.
Reading the documentation, I used docker run --rm httpd:2.4 cat /usr/local/apache2/conf/httpd.conf > my-httpd.conf
But this generates me on Windows machine a file around 42Kb.
I've mounted a volume and copied the file on a simple running httpd image and it's 20kb. using this one works.... why this happens?
Had the same issue on windows when creating the copy with docker run --rm httpd:2.4 cat /usr/local/apache2/conf/httpd.conf > my-httpd.conf.
I changed the encoding of my-httpd.conf to utf-8 and switched from CRLF to LF.
So the problem seems to be, that on windows the file gets saved with different encoding and Carriage Return before Line Feed.