Difference between revisions of "Docker Nginx"

From wikieduonline
Jump to navigation Jump to search
(Created page with "https://hub.docker.com/_/nginx == With errors == docker-compose up Creating network "nginx_default" with the default driver Creating nginx ... done Attaching to ngin...")
 
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
https://hub.docker.com/_/nginx
 
https://hub.docker.com/_/nginx
  
 +
Hosting some static content
 +
* <code>[[docker run]] -d  -v /some/content:/usr/share/nginx/html:ro --name your-nginx-name nginx</code>
  
  
 
+
[[/usr/share/nginx/html]]
  
  
Line 20: Line 22:
 
  nginx      | 2020/07/01 06:05:16 [emerg] 1#1: "server" directive is not allowed here in /etc/nginx/nginx.conf:1
 
  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
 
  nginx      | nginx: [emerg] "server" directive is not allowed here in /etc/nginx/nginx.conf:1
 +
 +
 +
== See also ==
 +
* {{Nginx}}
 +
* {{Docker}}
 +
 +
[[Category:Nginx]]
 +
[[Category:Docker]]

Latest revision as of 17:07, 15 February 2024

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

Hosting some static content

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


/usr/share/nginx/html


With errors[edit]

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[edit]

Advertising: