Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support c10s #150

Merged
merged 3 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 6/Dockerfile.c9s
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ LABEL summary="$SUMMARY" \
com.redhat.component="varnish-6-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=6/test/test-app/ sample-server" \
usage="s2i build https://github.com/sclorg/varnish-container.git --context-dir=6/test/test-app/ quay.io/sclorg/varnish-6-c9s sample-server" \
name="sclorg/varnish-6-c9s" \
maintainer="Uhliarik Lubos <luhliari@redhat.com>"

Expand Down
3 changes: 2 additions & 1 deletion 6/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,6 @@ Dockerfile and other sources for this container image are available on
https://github.com/sclorg/varnish-container.
In that repository you also can find another versions of Python environment Dockerfiles.
Dockerfile for RHEL8 it's `Dockerfile.rhel8`, for RHEL9 it's `Dockerfile.rhel9`,
Dockerfile for CentOS Stream 9 is called `Dockerfile.c9s`
Dockerfile for CentOS Stream 9 is called `Dockerfile.c9s`,
Dockerfile for CentOS Stream 10 is called `Dockerfile.c10s`
and the Fedora Dockerfile is called Dockerfile.fedora.
51 changes: 51 additions & 0 deletions 7/Dockerfile.c10s
Original file line number Diff line number Diff line change
@@ -0,0 +1,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 <luhliari@redhat.com>"

RUN INSTALL_PKGS="gettext hostname nss_wrapper 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
2 changes: 1 addition & 1 deletion 7/Dockerfile.fedora
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/fedora/s2i-core:38
FROM quay.io/fedora/s2i-core:39
EXPOSE 8080
EXPOSE 8443

Expand Down
3 changes: 2 additions & 1 deletion 7/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,6 @@ Dockerfile and other sources for this container image are available on
https://github.com/sclorg/varnish-container.
In that repository you also can find another versions of Python environment Dockerfiles.
Dockerfile for RHEL8 it's `Dockerfile.rhel8`, for RHEL9 it's `Dockerfile.rhel9`,
Dockerfile for CentOS Stream 9 is called `Dockerfile.c9s`
Dockerfile for CentOS Stream 9 is called `Dockerfile.c9s`,
Dockerfile for CentOS Stream 10 is called `Dockerfile.c10s`
and the Fedora Dockerfile is called Dockerfile.fedora.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Varnish HTTP accelerator container images

Images available on Quay are:
* CentOS Stream 9 [varnish-6](https://quay.io/repository/sclorg/varnish-6-c9s)
* CentOS Stream 10 [varnish-6](https://quay.io/repository/sclorg/varnish-7-c10s)
* Fedora [varnish-7](https://quay.io/repository/fedora/varnish-7)

This repository contains Dockerfiles for Varnish HTTP accelerator images.
Expand All @@ -23,6 +24,7 @@ RHEL versions currently supported are:

CentOS versions currently supported are:
* CentOS Stream 9
* CentOS Stream 10

For more information about contributing, see
[the Contribution Guidelines](https://github.com/sclorg/welcome/blob/master/contribution.md).
Expand All @@ -32,7 +34,7 @@ For more information about concepts used in these container images, see the

Installation
---------------
To build a Varnish image, choose either the CentOS or RHEL based image:
To build a Varnish image, choose either the CentOS Stream or RHEL based image:
* **RHEL based image**

These images are available in the [Red Hat Container Catalog](https://catalog.redhat.com/software/containers/rhel8/varnish-6/5ba0ae68bed8bd6ee8198613?container-tabs=overview).
Expand Down
3 changes: 3 additions & 0 deletions manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ DISTGEN_MULTI_RULES:
- src: src/Dockerfile.template
dest: Dockerfile.c9s

- src: src/Dockerfile.template
dest: Dockerfile.c10s

- src: src/Dockerfile.template
dest: Dockerfile.fedora

Expand Down
22 changes: 18 additions & 4 deletions specs/multispec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ specs:
distroinfo:
fedora:
distros:
- fedora-38-x86_64
s2i_base: quay.io/fedora/s2i-core:38
- fedora-39-x86_64
s2i_base: quay.io/fedora/s2i-core:39
install_pkgs: "gettext hostname nss_wrapper bind-utils varnish"
img_name: "fedora/varnish-7"
full_img_name: "quay.io/{{ spec.img_name }}"
Expand Down Expand Up @@ -42,8 +42,21 @@ specs:
prod: "c9s"
install_pkgs: "gettext hostname nss_wrapper bind-utils varnish gcc"
img_name: "{{ spec.org }}/varnish-{{ spec.version }}-{{ spec.prod }}"
full_img_name: "quay.io/{{ spec.img_name }}"
etc_path: /etc
c10s:
distros:
- centos-stream-10-x86_64
el_version: "10"
s2i_base: quay.io/sclorg/s2i-core-c10s
img_tag: "c10s"
org: "sclorg"
from_tag: "c10s"
prod: "c10s"
install_pkgs: "gettext hostname nss_wrapper bind-utils varnish gcc"
img_name: "{{ spec.org }}/varnish-{{ spec.version }}-{{ spec.prod }}"
full_img_name: "quay.io/{{ spec.img_name }}"
etc_path: /etc

version:
"6":
version: "6"
Expand All @@ -58,5 +71,6 @@ matrix:
- centos-stream-9-x86_64
version: "6"
- distros:
- fedora-38-x86_64
- fedora-39-x86_64
- centos-stream-10-x86_64
version: "7"
2 changes: 1 addition & 1 deletion src/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ RUN INSTALL_PKGS="{{ spec.install_pkgs }}" && \
{% endif %}
{{ commands.pkginstaller.install([], {'docs': False}) }} $INSTALL_PKGS && \
rpm -V $INSTALL_PKGS && \
{% if config.os.id == "fedora" or spec.prod == "rhel8" or spec.prod == "rhel9" or spec.prod == "c9s" %}
{% if config.os.id == "fedora" or spec.prod == "rhel8" or spec.prod == "rhel9" or spec.prod == "c9s" or spec.prod == "c10s" %}
fix-permissions $VARNISH_CONFIGURATION_PATH && \
fix-permissions /var/lib/varnish && \
varnishd -V 2>&1 | grep -qe "varnish-$VARNISH_VERSION\." && echo "Found VERSION $VARNISH_VERSION" && \
Expand Down
3 changes: 2 additions & 1 deletion src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,6 @@ Dockerfile and other sources for this container image are available on
https://github.com/sclorg/varnish-container.
In that repository you also can find another versions of Python environment Dockerfiles.
Dockerfile for RHEL8 it's `Dockerfile.rhel8`, for RHEL9 it's `Dockerfile.rhel9`,
Dockerfile for CentOS Stream 9 is called `Dockerfile.c9s`
Dockerfile for CentOS Stream 9 is called `Dockerfile.c9s`,
Dockerfile for CentOS Stream 10 is called `Dockerfile.c10s`
and the Fedora Dockerfile is called Dockerfile.fedora.
10 changes: 0 additions & 10 deletions src/content_sets.yml

This file was deleted.