NGINX Container SPA Ready with GZip enabled
517
Dockerfile to create a NGINX container image who is SPA ready and has GZip enabled.
docker pull credija/nginx:lts
Start NGINX using:
docker run --name nginx-credija -d --restart=always \
--publish 8080:80 \
-m 256MB \
credija/nginx:lts
Also, if you want to overwrite and provide your own config file use this:
docker run --name nginx-credija -d --restart=always \
--publish 8080:80 \
-m 256MB \
--volume /opt/your-nginx.conf:/etc/nginx/nginx.conf \
credija/nginx:lts
Alternatively, you can use the sample docker-compose.yml file to start the container using Docker Compose
Point your browser to http://localhost:8080 and follow the setup procedure to complete the installation.
To upgrade to newer releases:
docker pull credija/nginx:{version}
docker stop nginx-credija
docker rm -v nginx-credija
docker run -name nginx-credija -d \
[OPTIONS] \
credija/nginx:{version}
For debugging and maintenance purposes you may want access the containers shell. If you are using Docker version 1.3.0 or higher you can access a running containers shell by starting bash using docker exec:
docker exec -it nginx-credija bash
Content type
Image
Digest
Size
42.6 MB
Last updated
almost 8 years ago
docker pull credija/nginx