-
Notifications
You must be signed in to change notification settings - Fork 24
/
Dockerfile.c10s
51 lines (43 loc) · 2.1 KB
/
Dockerfile.c10s
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
47
48
49
50
51
FROM quay.io/sclorg/s2i-core-c10s:c10s
EXPOSE 8080
EXPOSE 8443
ENV SUMMARY="Platform for running Varnish or building Varnish-based application" \
DESCRIPTION="Varnish available as container is a base platform for \
running Varnish server or building Varnish-based application. \
Varnish Cache stores web pages in memory so web servers don't have to create \
the same web page over and over again. Varnish Cache serves pages much faster \
than any application server; giving the website a significant speed up." \
VARNISH_VCL=/etc/varnish/default.vcl \
VARNISH_CONFIGURATION_PATH=/etc/varnish \
VARNISH_VERSION=7
LABEL summary="$SUMMARY" \
description="$DESCRIPTION" \
io.k8s.description="$DESCRIPTION" \
io.k8s.display-name="Varnish 7" \
io.openshift.expose-services="8080:http,8443:https" \
io.openshift.tags="builder,varnish7,varnish-7" \
com.redhat.component="varnish-7-container" \
com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#rhel" \
version="1" \
usage="s2i build https://github.com/sclorg/varnish-container.git --context-dir=7/test/test-app/ quay.io/sclorg/varnish-7-c10s sample-server" \
name="sclorg/varnish-7-c10s" \
maintainer="Uhliarik Lubos <[email protected]>"
RUN INSTALL_PKGS="gettext hostname nss_wrapper-libs bind-utils varnish gcc" && \
yum -y --setopt=tsflags=nodocs install $INSTALL_PKGS && \
rpm -V $INSTALL_PKGS && \
fix-permissions $VARNISH_CONFIGURATION_PATH && \
fix-permissions /var/lib/varnish && \
varnishd -V 2>&1 | grep -qe "varnish-$VARNISH_VERSION\." && echo "Found VERSION $VARNISH_VERSION" && \
rm -f /etc/profile.d/lang.sh && \
rm -f /etc/profile.d/lang.csh && \
yum -y clean all --enablerepo='*'
# Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH
COPY 7/s2i/bin/ $STI_SCRIPTS_PATH
# Copy extra files to the image.
COPY 7/root/ /
RUN chmod -R a+rwx ${APP_ROOT}/etc && \
chown -R 1001:0 ${APP_ROOT}
# Reset permissions of filesystem to default values
RUN rpm-file-permissions
USER 1001
CMD $STI_SCRIPTS_PATH/usage