1
0
mirror of https://github.com/rlister/dockerfiles.git synced 2025-12-11 00:36:27 +00:00

move default debian install to latest, add nginx.org install in stable

This commit is contained in:
Richard Lister
2015-06-22 16:10:43 -04:00
parent 003ca029f4
commit 1e768c3cc1
3 changed files with 28 additions and 1 deletions

View File

@@ -3,6 +3,11 @@
About as simple as it gets, nginx installed on debian:jessie. Use this
if your app is based on debian:jessie also, so they can share base.
## Versions
- `latest`: installs latest debian.org package
- `stable`: installs `stable` package from nginx.org; this will generally be newer
## Usage
```
@@ -11,5 +16,5 @@ docker run -d --name nginx \
-v /var/www/html:/var/www/html \
-v /var/log/nginx:/var/log/nginx \
-p 80:80 -p 443:443 \
rlister/nginx
rlister/nginx:stable
```

22
nginx/stable/Dockerfile Normal file
View File

@@ -0,0 +1,22 @@
FROM debian:jessie
MAINTAINER Ric Lister <rlister@gmail.com>
ADD http://nginx.org/keys/nginx_signing.key /tmp/
RUN apt-key add /tmp/nginx_signing.key && \
rm -f /tmp/nginx_signing.key && \
(echo 'deb http://nginx.org/packages/debian/ jessie nginx' >> /etc/apt/sources.list) && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -yq nginx && \
rm -rf /var/lib/apt/lists/* && \
echo "\ndaemon off;" >> /etc/nginx/nginx.conf
VOLUME [ "/etc/nginx/sites-enabled", "/etc/nginx/certs", "/etc/nginx/conf.d", "/var/log/nginx", "/var/www/html" ]
WORKDIR /etc/nginx
EXPOSE 80 443
CMD [ "nginx" ]