-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
46 lines (46 loc) · 2.2 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Salim Badakhchani <[email protected]>
#
# "ported" by Adam Miller <[email protected]> from
# https://github.com/fedora-cloud/Fedora-Dockerfiles
#
# Originally written for Fedora-Dockerfiles by
# scollier <[email protected]>
#
# Enriched by patterns found at https://github.com/openshift/postgresql/blob/master/9.4/Dockerfile.rhel7 by
# Christoph Görn <[email protected]>
FROM centos:centos7
MAINTAINER The CentOS Project <[email protected]>
# Labels consumed by Red Hat build service
LABEL Component="nginx" \
Name="centos/nginx-180-centos7" \
Version="1.8.0" \
Release="1"
# Labels could be consumed by OpenShift
LABEL io.k8s.description="nginx [engine x] is an HTTP and reverse proxy server, a mail proxy server, and a generic TCP/UDP proxy server, originally written by Igor Sysoev." \
io.k8s.display-name="nginx 1.8.0" \
io.openshift.expose-services="80:http" \
io.openshift.tags="nginx"
RUN yum -y install --setopt=tsflags=nodocs centos-release-scl-rh && \
yum -y update --setopt=tsflags=nodocs && \
yum -y install --setopt=tsflags=nodocs scl-utils rh-nginx18 && \
yum clean all && \
mkdir -p /usr/share/nginx/html
# Get prefix path and path to scripts rather than hard-code them in scripts
ENV CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/nginx \
ENABLED_COLLECTIONS=rh-nginx18
# When bash is started non-interactively, to run a shell script, for example it
# looks for this variable and source the content of this file. This will enable
# the SCL for all scripts without need to do 'scl enable'.
ENV BASH_ENV=${CONTAINER_SCRIPTS_PATH}/scl_enable \
ENV=${CONTAINER_SCRIPTS_PATH}/scl_enable \
PROMPT_COMMAND=". ${CONTAINER_SCRIPTS_PATH}/scl_enable"
ADD root /
# Fix write to error_log even though /dev/stderr is set
RUN chmod -R go+rwx /var/opt/rh/rh-nginx18
# ADD https://git.centos.org/sources/httpd/c7/acf5cccf4afaecf3afeb18c50ae59fd5c6504910 /usr/share/nginx/html/
# RUN sed -i -e 's/Apache/nginx/g' -e '/apache_pb.gif/d' /usr/share/nginx/html/index.html
RUN echo "The Bluebank Bring Your Own Container demo running nginx on CentOS7" > /usr/share/nginx/html/index.html
EXPOSE 80
USER 499
ENTRYPOINT ["container-entrypoint"]
CMD [ "nginx18" ]