Skip to content
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
4 changes: 2 additions & 2 deletions .github/workflows/build-and-push-dev-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ on:
required: false
lang:
description: List of languages to build
default: 'gcc-toolset, golang, nginx, nodejs, php, python, redis, ruby, haproxy, kubectl, helm, ocne-tools'
default: 'gcc-toolset, golang, nginx, nodejs, php, python, redis, ruby, haproxy, kubectl, helm, ocne-tools, httpd'
required: false

# Default values for the builds triggered by the push event
env:
ol: 'oraclelinux7, oraclelinux8, oraclelinux9'
lang: 'gcc-toolset, golang, nodejs, nginx, php, python, redis, ruby, haproxy, kubectl, helm, ocne-tools'
lang: 'gcc-toolset, golang, nodejs, nginx, php, python, redis, ruby, haproxy, kubectl, helm, ocne-tools, httpd'

jobs:
prepare:
Expand Down
18 changes: 18 additions & 0 deletions OracleLinuxDevelopers/oraclelinux9/httpd/2.4/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM ghcr.io/oracle/oraclelinux:9

RUN dnf install -y httpd mod_ssl && \
rm -rf /var/cache/dnf

RUN sed -i \
-e 's/^SSLCertificateFile .*/SSLCertificateFile \/certs\/fullchain.pem/g' \
-e 's/^SSLCertificateKeyFile .*/SSLCertificateKeyFile \/certs\/privkey.pem/g' \
/etc/httpd/conf.d/ssl.conf

RUN mkdir -p /certs

ENV CERTIFICATE_DIR /certs
ENV KEY_DIR /certs

COPY ./entrypoint.sh /opt/entrypoint.sh

CMD ["/opt/entrypoint.sh"]
18 changes: 18 additions & 0 deletions OracleLinuxDevelopers/oraclelinux9/httpd/2.4/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

set -eu pipefail

SERVER_CERT="$CERTIFICATE_DIR/fullchain.pem"
SERVER_KEY="$KEY_DIR/privkey.pem"

if [ ! -f "$SERVER_KEY" ]; then
echo "Generating certificate private key for SSL support" 1>&2
openssl genpkey -algorithm RSA -out "$SERVER_KEY" 1>&2
fi

if [ ! -f "$SERVER_CERT" ]; then
echo "Generating self-signed certificate for SSL support" 1>&2
openssl req -x509 -new -nodes -key "$SERVER_KEY" -sha256 -days 3650 -out "$SERVER_CERT" -subj "/C=US/ST=California/L=San Francisco/O=Test Company/CN=localhost" 1>&2
fi

httpd -DFOREGROUND