-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathContainerfile
24 lines (24 loc) · 1.28 KB
/
Containerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# -------------------------------------------------------------------------------------------------
# Transform yolo content into plain HTML,CSS and Javascript to be served by apache below.
# -------------------------------------------------------------------------------------------------
FROM localhost/yoloc:latest AS BUILDER
WORKDIR /tmp/yolo
COPY . /tmp/yolo
RUN jekyll build
# -------------------------------------------------------------------------------------------------
# Yolo runtime image based on apache, that serves the build site on port 9696.
# -------------------------------------------------------------------------------------------------
FROM registry.access.redhat.com/ubi8-minimal:8.7-923
LABEL maintainer="corbs"
ENV PORT 9696
RUN microdnf update --disablerepo=* --enablerepo=ubi-8-appstream-rpms --enablerepo=ubi-8-baseos-rpms -y && \
microdnf install --disablerepo=* --enablerepo=ubi-8-appstream-rpms --enablerepo=ubi-8-baseos-rpms httpd -y && \
microdnf clean all
RUN sed -ri -e "/^Listen 80/c\Listen ${PORT}" /etc/httpd/conf/httpd.conf && \
chown -R apache:apache /etc/httpd/logs/ && \
chown -R apache:apache /run/httpd/
USER apache
EXPOSE ${PORT}
COPY --from=BUILDER /tmp/yolo/_site /var/www/html
# Start Apache in the foreground
CMD ["httpd", "-D", "FOREGROUND"]