Skip to content

Instantly share code, notes, and snippets.

@frjaraur
Created March 5, 2018 22:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save frjaraur/b284f39f9c13fa24116c0f86d9264d7e to your computer and use it in GitHub Desktop.
Save frjaraur/b284f39f9c13fa24116c0f86d9264d7e to your computer and use it in GitHub Desktop.
no-shell nginx
FROM alpine
RUN apk add --update --no-cache nginx tzdata \
&& rm -rf /var/cache/apk \
&& rm -f /bin/sh \
&& mkdir /run/nginx \
&& ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log
ENTRYPOINT ["/usr/sbin/nginx","-g","daemon off;"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment