forked from eclipse-che/che-plugin-registry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.rhel
49 lines (42 loc) · 1.61 KB
/
Dockerfile.rhel
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
#
# Copyright (c) 2018-2019 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
FROM mikefarah/yq as builder
RUN apk add --no-cache bash
COPY .htaccess README.md ./scripts/*.sh /build/
COPY /plugins /build/plugins
COPY /v2 /build/v2
COPY /v3 /build/v3
WORKDIR /build/
RUN ./check_plugins_location_v1.sh
RUN ./check_plugins_location_v2.sh v2
RUN ./check_plugins_location_v2.sh v3
RUN ./check_plugins_images.sh
RUN ./set_plugin_dates.sh
RUN ./check_plugins_viewer_mandatory_fields_v1.sh
RUN ./check_plugins_viewer_mandatory_fields_v2.sh
RUN ./check_plugins_viewer_mandatory_fields_v3.sh
RUN ./ensure_latest_exists.sh
RUN ./index.sh > /build/plugins/index.json
RUN ./index_v2.sh v2 > /build/v2/plugins/index.json
RUN ./index_v2.sh v3 > /build/v3/plugins/index.json
FROM quay.io/openshiftio/rhel-base-httpd:latest
RUN sed -i -e "s,Listen 80,Listen 8080," /etc/httpd/conf/httpd.conf
RUN sed -i -e "s,logs/error_log,/dev/stderr," /etc/httpd/conf/httpd.conf
RUN sed -i -e "s,logs/access_log,/dev/stdout," /etc/httpd/conf/httpd.conf
RUN sed -i -e "s,AllowOverride None,AllowOverride All," /etc/httpd/conf/httpd.conf
EXPOSE 80
# the htpasswd file may be periodically replaced during run
RUN chmod a+rwX /etc/httpd/conf
RUN chmod a+rwX /run/httpd
RUN mkdir /var/www/html/plugins
RUN mkdir /var/www/html/v2
RUN mkdir /var/www/html/v3
COPY --from=builder /build/ /var/www/html/
STOPSIGNAL SIGWINCH
ENTRYPOINT ["/usr/sbin/httpd", "-D", "FOREGROUND"]