All Projects → KyleAMathews → Docker Nginx

KyleAMathews / Docker Nginx

Licence: mit
Nginx Docker image for easy hosting of static sites

Labels

Projects that are alternatives of or similar to Docker Nginx

Open Proxy
一键部署被墙网站反向代理; 免翻墙访问被禁网站
Stars: ✭ 274 (-15.43%)
Mutual labels:  nginx
Awesome Live Stream
Webrtc && Nginx && DASH && Quic 学习资料收集,持续更新中
Stars: ✭ 290 (-10.49%)
Mutual labels:  nginx
Nginx Proxy Manager
Docker container for managing Nginx proxy hosts with a simple, powerful interface
Stars: ✭ 5,221 (+1511.42%)
Mutual labels:  nginx
Luajit.io
luajit io framework
Stars: ✭ 277 (-14.51%)
Mutual labels:  nginx
Ngx php
ngx_php - Embedded php scripting language for nginx module. All released versions of the code repository.
Stars: ✭ 290 (-10.49%)
Mutual labels:  nginx
Nginx Admin
Nginx admin is an open source multiplatform manager for nginx software to easy administration
Stars: ✭ 294 (-9.26%)
Mutual labels:  nginx
Flagger
Progressive delivery Kubernetes operator (Canary, A/B Testing and Blue/Green deployments)
Stars: ✭ 3,337 (+929.94%)
Mutual labels:  nginx
Config
Armbian configuration utility
Stars: ✭ 317 (-2.16%)
Mutual labels:  nginx
Docker Webserver
WebServer (MariaDB, PHP-FPM, Nginx) composed from several separate containers linked together
Stars: ✭ 290 (-10.49%)
Mutual labels:  nginx
Foshttpcache
Integrate your PHP application with your HTTP caching proxy
Stars: ✭ 308 (-4.94%)
Mutual labels:  nginx
Docker Nginx Auto Ssl
Docker image for automatic generation of SSL certs using Let's encrypt and Open Resty
Stars: ✭ 282 (-12.96%)
Mutual labels:  nginx
Docker
LibreNMS Docker image based on Alpine Linux and Nginx
Stars: ✭ 283 (-12.65%)
Mutual labels:  nginx
Kataribe
Access log profiler based on response time
Stars: ✭ 298 (-8.02%)
Mutual labels:  nginx
Nginx Craft
An Nginx virtual host configuration for Craft CMS that implements a number of best-practices.
Stars: ✭ 276 (-14.81%)
Mutual labels:  nginx
Docker Lnmp
😒 Deploy lnmp(Linux, Nginx, MySQL, PHP7) using docker.
Stars: ✭ 310 (-4.32%)
Mutual labels:  nginx
Nginx Resources
A collection of resources covering Nginx, Nginx + Lua, OpenResty and Tengine
Stars: ✭ 2,957 (+812.65%)
Mutual labels:  nginx
Rhit
A nginx log explorer
Stars: ✭ 231 (-28.7%)
Mutual labels:  nginx
Reading
整理阅读过的干货文章, 帖子
Stars: ✭ 318 (-1.85%)
Mutual labels:  nginx
Slickstack
SlickStack is a free LEMP stack automation script written in Bash designed to enhance and simplify WordPress provisioning, performance, and security.
Stars: ✭ 311 (-4.01%)
Mutual labels:  nginx
Awesome Programming Books
📚 经典技术书籍推荐,持续更新...
Stars: ✭ 3,472 (+971.6%)
Mutual labels:  nginx

docker-nginx

A high-performance Nginx base image for Docker to serve static websites. It will serve anything in the /var/www directory.

To build a Docker image for your site, you'll need to create a Dockerfile. For example, if your site is in a directory called src/, you could create this Dockerfile:

FROM kyma/docker-nginx
COPY src/ /var/www
CMD 'nginx'

Then build and run it:

$ docker build -t mysite .
...
Successfully built 5ae2fb5cf4f8
$ docker run -p 80:80 -d mysite
da809981545f
$ curl localhost
...

Docker Hub

The trusted build information can be found on the Docker Hub at https://registry.hub.docker.com/u/kyma/docker-nginx/.

SSL

To use SSL, put your certs in /etc/nginx/ssl and enable the default-ssl site:

ADD server.crt /etc/nginx/ssl/
ADD server.key /etc/nginx/ssl/
RUN ln -s /etc/nginx/sites-available/default-ssl /etc/nginx/sites-enabled/default-ssl

When you run it, you'll want to make port 443 available, e.g.:

$ docker run -p 80:80 -p 443:443 -d mysite

nginx.conf

The nginx.conf and mime.types are pulled with slight modifications from the h5bp Nginx HTTP server boilerplate configs project at https://github.com/h5bp/server-configs-nginx

Customized configs

To modify the NGINX config, you would just create a custom Dockerfile like the following where you copy in your modified config files.

# Guide here:
# https://github.com/KyleAMathews/docker-nginx

# Build docker file
# docker build -t CONTAINERNAME .

# Build from this repo's image
FROM kyma/docker-nginx

# Example if you wanna swap the default server file.
COPY path/to/your/default /etc/nginx/sites-enabled/default

# Add src.
COPY src/ /var/www

CMD 'nginx'
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].