diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6a9d249 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +FROM nginx:mainline-alpine + +# Install: +# - rsyslog for logs aggregation +# - bash for a normal shell +# - supervisord for running parallel processes and monitoring them +# - the rest for PIP to build supervisord + +RUN apk add --force --update \ + bash rsyslog openssl dcron python python-dev py-pip vim \ + gcc musl-dev linux-headers \ + augeas-dev openssl-dev libffi-dev ca-certificates dialog \ + && pip install supervisor \ + && apk del --force gcc libffi-dev musl-dev linux-headers augeas-dev openssl-dev libffi-dev \ + && rm -rf /var/cache/apk/* + +# WWW (nginx) +RUN addgroup -g 1000 production \ + && adduser -u 1000 -H -D -s /bin/sh -G production production + +EXPOSE 80 +EXPOSE 443 diff --git a/README.md b/README.md new file mode 100644 index 0000000..ef1a6ab --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +Nginx on Alpine with Supervisor +=============================== + +Includes: +- Nginx +- Supervisor +- production user with uid=1000 and gid=1000 +- dcron