Skip to content

Instantly share code, notes, and snippets.

@jojijacobk
Last active July 12, 2020 10:19
Show Gist options
  • Save jojijacobk/9271a7c60c1afb865ca163657fcb0bdc to your computer and use it in GitHub Desktop.
Save jojijacobk/9271a7c60c1afb865ca163657fcb0bdc to your computer and use it in GitHub Desktop.
Dockefile for Nginx on Oracle linux
FROM oraclelinux
MAINTAINER "Joji Jacob" <joji.jacob.k@gmail.com>
USER root
# Install nginx
RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && \
yum install -y nginx
# Forward request and error logs to docker log collector
RUN ln -sf /dev/stdout /var/log/nginx/access.log && \
ln -sf /dev/stderr /var/log/nginx/error.log
EXPOSE 80 443
CMD ["nginx", "-g", "daemon off;"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment