Difference between revisions of "Docker Nginx"

From wikieduonline
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
  
 
Hosting some static content
 
Hosting some static content
* <code>[[docker run]] --name your-nginx-name -v /some/content:/usr/share/nginx/html:ro -d nginx</code>
+
* <code>[[docker run]] --v /some/content:/usr/share/nginx/html:ro --name your-nginx-name nginx</code>
  
  
 +
[[/usr/share/nginx/html]]
  
  

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: