Docker Community Forums

Share and learn in the Docker community.

Adding Custom Configs to docker image


(Sbrem00) #1

I am trying to change the client_max_body_size in the Nginx server running on docker.

I have tried to add the following to my docker file with no luck

RUN { echo 'client_max_body_size 100M;'; } > /etc/nginx/nginx.conf

and also

COPY nginx.conf /etc/nginx/nginx.conf

(there is a copy of the nginx.conf file with the client_max_body_size attribute added)

Does anyone know the correct way of doing this?

(Xipbv) #2

You could try this in the Dockerfile of the NGINX server.

RUN echo “client_max_body_size 100M” >> /etc/nginx/nginx.conf