Difference between revisions of "Docker Nginx"

From wikieduonline
Jump to navigation Jump to search
Line 1: Line 1:
 
https://hub.docker.com/_/nginx
 
https://hub.docker.com/_/nginx
  
 
+
Hosting some static content
 +
* <code>[[docker run]] --name your-nginx-name -v /some/content:/usr/share/nginx/html:ro -d nginx</code>
  
  

Revision as of 11:31, 15 March 2021

https://hub.docker.com/_/nginx

Hosting some static content

  • docker run --name your-nginx-name -v /some/content:/usr/share/nginx/html:ro -d nginx



With errors

docker-compose up
Creating network "nginx_default" with the default driver
Creating nginx ... done
Attaching to nginx
nginx      | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
nginx      | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
nginx      | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
nginx      | 10-listen-on-ipv6-by-default.sh: Getting the checksum of /etc/nginx/conf.d/default.conf
nginx      | 10-listen-on-ipv6-by-default.sh: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
nginx      | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
nginx      | /docker-entrypoint.sh: Configuration complete; ready for start up
nginx      | 2020/07/01 06:05:16 [emerg] 1#1: "server" directive is not allowed here in /etc/nginx/nginx.conf:1
nginx      | nginx: [emerg] "server" directive is not allowed here in /etc/nginx/nginx.conf:1


See also

Advertising: