Cannot get Nginx image working inside Docker container

I cannot figure out what is the problem with the official nginx image for docker. I use it in docker-compose.yml file as indicated on the official image page: web: image: nginx volumes: – ./custom-nginx.conf:/etc/nginx/conf.d/custom-nginx.conf ports: – “80:80” environment: – NGINX_HOST=mysite.com – NGINX_PORT=80 command: /bin/sh -c “envsubst < /etc/nginx/conf.d/custom-nginx.conf > /etc/nginx/conf.d/default.conf && exec nginx -g ‘daemon…