I am trying to mount a local directory to a container to allow local configuration of a nginx reverse proxy.
version: ‘3.7’
services:
web:
image: nginx:alpine
container_name: nginx-proxy
ports:
- “80:80”
- “443:443”
volumes:
- ./nginx/conf:/etc/nginx
- ./nginx/cert:/etc/ssl/private
As outlined here
docker should create a bunch of lokal files. However, it creates the directories but comes up with an error message - nginx: [emerg] open() “/etc/nginx/nginx.conf” failed (2: No such file or directory)
I am unclear if now docker creates those files locally - retrieving them from the container? But why does it state that the nginfx.conf does not exist?
Thanks.