Docker – Dockerfile EOF example

Dockerfile:

FROM nginx:latest

RUN rm -rf /etc/nginx/conf.d/default.conf && \
    echo \
'server {\n\
    listen       80;\n\
    server_name  localhost;\n\
    root   /usr/share/nginx/html;\n\
\n\
    location / {\n\
        index  index.html index.htm;\n\
    }\n\
}\n '\
>> /etc/nginx/conf.d/default.conf

Tagged: Tags

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments