Skip to content

Instantly share code, notes, and snippets.

@dolegi dolegi/Dockerfile
Last active Jun 12, 2019

What would you like to do?
dockerized nginx static file server with subdomain dynamic routing and gzip compression
server {
server_name ~^(?<subdomain>.+)$ ;
root /usr/share/nginx/$subdomain;
listen 7070 http2;
gzip on;
gzip_disable "msie6";
gzip_min_length 0;
gzip_types *;
location / {
index index.html index.htm;
expires 7d;
FROM nginx:alpine
COPY default.conf /etc/nginx/conf.d/default.conf
RUN mkdir -p /usr/share/nginx/one
RUN mkdir -p /usr/share/nginx/two
COPY index.html /usr/share/nginx/one/index.html
COPY index2.html /usr/share/nginx/two/index.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.