From 971563291c32fbd742ff913d33ec22626d8929c0 Mon Sep 17 00:00:00 2001 From: Avi Miller Date: Thu, 30 Nov 2023 10:44:15 +1100 Subject: [PATCH] Add developer images for the new modules in Oracle Linux 8 Update 9 Signed-off-by: Avi Miller --- OracleLinuxDevelopers/README.md | 17 ++++----- .../oraclelinux8/nginx/1.22/Dockerfile | 23 ++++++++++++ .../oraclelinux8/nginx/latest | 2 +- .../oraclelinux8/nodejs/20/Dockerfile | 10 +++++ .../oraclelinux8/php/8.0-apache/Dockerfile | 37 +++++++++++++++++++ .../oraclelinux8/php/8.0-cli/Dockerfile | 16 ++++++++ .../oraclelinux8/php/8.0-fpm/Dockerfile | 30 +++++++++++++++ .../oraclelinux8/ruby/3.1/Dockerfile | 13 +++++++ 8 files changed, 138 insertions(+), 10 deletions(-) create mode 100644 OracleLinuxDevelopers/oraclelinux8/nginx/1.22/Dockerfile create mode 100644 OracleLinuxDevelopers/oraclelinux8/nodejs/20/Dockerfile create mode 100644 OracleLinuxDevelopers/oraclelinux8/php/8.0-apache/Dockerfile create mode 100644 OracleLinuxDevelopers/oraclelinux8/php/8.0-cli/Dockerfile create mode 100644 OracleLinuxDevelopers/oraclelinux8/php/8.0-fpm/Dockerfile create mode 100644 OracleLinuxDevelopers/oraclelinux8/ruby/3.1/Dockerfile diff --git a/OracleLinuxDevelopers/README.md b/OracleLinuxDevelopers/README.md index 703aee4dde..ebf4a69480 100644 --- a/OracleLinuxDevelopers/README.md +++ b/OracleLinuxDevelopers/README.md @@ -73,10 +73,8 @@ You should then be able to create a new Ruby on Rails application. ### NGINX module -* [`oraclelinux8-nginx:1.14`](oraclelinux8/nginx/1.14/Dockerfile) -* [`oraclelinux8-nginx:1.16`](oraclelinux8/nginx/1.16/Dockerfile) -* [`oraclelinux8-nginx:1.18`](oraclelinux8/nginx/1.18/Dockerfile) * [`oraclelinux8-nginx:1.20`](oraclelinux8/nginx/1.20/Dockerfile) +* [`oraclelinux8-nginx:1.22`](oraclelinux8/nginx/1.22/Dockerfile) ### Node.js module @@ -85,22 +83,22 @@ You should then be able to create a new Ruby on Rails application. * [`oraclelinux8-nodejs:14-oracledb`](oraclelinux8/nodejs/14-oracledb/Dockerfile) * [`oraclelinux8-nodejs:16`](oraclelinux8/nodejs/16/Dockerfile) * [`oraclelinux8-nodejs:18`](oraclelinux8/nodejs/18/Dockerfile) +* [`oraclelinux8-nodejs:20`](oraclelinux8/nodejs/20/Dockerfile) -**Tip:** support for `yarn` is included with `oraclelinux8-nodejs:18` but is -opt-in. To activate `yarn`, run `corepack enable` when building your downstream -image. +**Tip:** support for `yarn` is included with `oraclelinux8-nodejs:18` and `oraclelinux8-nodejs:20` but is +opt-in. To activate `yarn`, run `corepack enable` when building your downstream image. ### PHP module -* [`oraclelinux8-php:7.3-apache`](oraclelinux8/php/7.3-apache/Dockerfile) -* [`oraclelinux8-php:7.3-cli`](oraclelinux8/php/7.3-cli/Dockerfile) -* [`oraclelinux8-php:7.3-fpm`](oraclelinux8/php/7.3-fpm/Dockerfile) * [`oraclelinux8-php:7.4-apache`](oraclelinux8/php/7.4-apache/Dockerfile) * [`oraclelinux8-php:7.4-apache-oracledb`](oraclelinux8/php/7.4-apache-oracledb/Dockerfile) * [`oraclelinux8-php:7.4-cli`](oraclelinux8/php/7.4-cli/Dockerfile) * [`oraclelinux8-php:7.4-cli-oracledb`](oraclelinux8/php/7.4-cli-oracledb/Dockerfile) * [`oraclelinux8-php:7.4-fpm`](oraclelinux8/php/7.4-fpm/Dockerfile) * [`oraclelinux8-php:7.4-fpm-oracledb`](oraclelinux8/php/7.4-fpm-oracledb/Dockerfile) +* [`oraclelinux8-php:8.0-apache`](oraclelinux8/php/8.0-apache/Dockerfile) +* [`oraclelinux8-php:8.0-cli`](oraclelinux8/php/8.0-cli/Dockerfile) +* [`oraclelinux8-php:8.0-fpm`](oraclelinux8/php/8.0-fpm/Dockerfile) ### Python modules @@ -130,6 +128,7 @@ You should then be able to create a new Ruby on Rails application. * [`oraclelinux8-ruby:2.7`](oraclelinux8/ruby/2.7/Dockerfile) * [`oraclelinux8-ruby:2.7-nodejs`](oraclelinux8/ruby/2.7-nodejs/Dockerfile) * [`oraclelinux8-ruby:3.0`](oraclelinux8/ruby/3.0/Dockerfile) +* [`oraclelinux8-ruby:3.1`](oraclelinux8/ruby/3.1/Dockerfile) [1]: https://github.com/orgs/oracle/packages?repo_name=docker-images [2]: https://yum.oracle.com diff --git a/OracleLinuxDevelopers/oraclelinux8/nginx/1.22/Dockerfile b/OracleLinuxDevelopers/oraclelinux8/nginx/1.22/Dockerfile new file mode 100644 index 0000000000..8877abd5ee --- /dev/null +++ b/OracleLinuxDevelopers/oraclelinux8/nginx/1.22/Dockerfile @@ -0,0 +1,23 @@ +# Copyright (c) 2023 Oracle and/or its affiliates. +# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. + +FROM ghcr.io/oracle/oraclelinux:8 + +RUN \ + # Explicitly disable PHP to suppress conflicting requests error + dnf -y module disable php \ + && \ + dnf -y module enable nginx:1.22 && \ + dnf -y install nginx && \ + rm -rf /var/cache/dnf \ + && \ + # forward request and error logs to container engine log collector + ln -sf /dev/stdout /var/log/nginx/access.log && \ + ln -sf /dev/stderr /var/log/nginx/error.log + +EXPOSE 80/tcp +EXPOSE 443/tcp + +STOPSIGNAL SIGQUIT + +CMD ["nginx", "-g", "daemon off;"] diff --git a/OracleLinuxDevelopers/oraclelinux8/nginx/latest b/OracleLinuxDevelopers/oraclelinux8/nginx/latest index 0fdd2359fd..e342dea0de 120000 --- a/OracleLinuxDevelopers/oraclelinux8/nginx/latest +++ b/OracleLinuxDevelopers/oraclelinux8/nginx/latest @@ -1 +1 @@ -1.20 \ No newline at end of file +1.22 \ No newline at end of file diff --git a/OracleLinuxDevelopers/oraclelinux8/nodejs/20/Dockerfile b/OracleLinuxDevelopers/oraclelinux8/nodejs/20/Dockerfile new file mode 100644 index 0000000000..00f94b1c4d --- /dev/null +++ b/OracleLinuxDevelopers/oraclelinux8/nodejs/20/Dockerfile @@ -0,0 +1,10 @@ +# Copyright (c) 2023, Oracle and/or its affiliates. +# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. + +FROM ghcr.io/oracle/oraclelinux:8 + +RUN dnf -y module enable nodejs:20 && \ + dnf -y install nodejs npm && \ + rm -rf /var/cache/dnf + +CMD ["/bin/node", "-v"] diff --git a/OracleLinuxDevelopers/oraclelinux8/php/8.0-apache/Dockerfile b/OracleLinuxDevelopers/oraclelinux8/php/8.0-apache/Dockerfile new file mode 100644 index 0000000000..a1902fbd8d --- /dev/null +++ b/OracleLinuxDevelopers/oraclelinux8/php/8.0-apache/Dockerfile @@ -0,0 +1,37 @@ +# Copyright (c) 2023 Oracle and/or its affiliates. +# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. + +FROM ghcr.io/oracle/oraclelinux:8 + +# hadolint shell=/usr/bin/bash +RUN dnf -y module enable php:8.0 httpd:2.4 && \ + dnf -y install httpd httpd-filesystem httpd-tools \ + mod_http2 mod_ssl openssl \ + php php-cli php-common php-json php-mbstring php-mysqlnd php-pdo php-xml && \ + rm -rf /var/cache/dnf \ + && \ + # Disable event module and enable prefork so that mod_php is enabled + sed -i 's/#LoadModule mpm_prefork_module modules\/mod_mpm_prefork.so/LoadModule mpm_prefork_module modules\/mod_mpm_prefork.so/' /etc/httpd/conf.modules.d/00-mpm.conf && \ + sed -i 's/LoadModule mpm_event_module modules\/mod_mpm_event.so/#LoadModule mpm_event_module modules\/mod_mpm_event.so/' /etc/httpd/conf.modules.d/00-mpm.conf && \ + # Disable HTTP2 as it is not supported with the prefork module + sed -i 's/LoadModule http2_module modules\/mod_http2.so/#LoadModule http2_module modules\/mod_http2.so/' /etc/httpd/conf.modules.d/10-h2.conf && \ + sed -i 's/LoadModule proxy_http2_module modules\/mod_proxy_http2.so/#LoadModule proxy_http2_module modules\/mod_proxy_http2.so/' /etc/httpd/conf.modules.d/10-proxy_h2.conf \ + && \ + # Create self-signed certificate for mod_ssl + openssl req -x509 -nodes -newkey rsa:4096 \ + -keyout /etc/pki/tls/private/localhost.key \ + -out /etc/pki/tls/certs/localhost.crt \ + -days 3650 -subj '/CN=localhost' \ + && \ + # Redirect logging to stdout/stderr for container logging to work + sed -i 's/;error_log = syslog/error_log = \/dev\/stderr/' /etc/php.ini && \ + ln -sf /dev/stdout /var/log/httpd/access_log && \ + ln -sf /dev/stderr /var/log/httpd/error_log && \ + ln -sf /dev/stdout /var/log/httpd/ssl_access_log && \ + ln -sf /dev/stderr /var/log/httpd/ssl_error_log && \ + # Disable userdirs and the auto-generated welcome message + rm -f /etc/httpd/conf.d/{userdir.conf,welcome.conf} + +EXPOSE 80 443 + +CMD ["/sbin/httpd", "-DFOREGROUND"] diff --git a/OracleLinuxDevelopers/oraclelinux8/php/8.0-cli/Dockerfile b/OracleLinuxDevelopers/oraclelinux8/php/8.0-cli/Dockerfile new file mode 100644 index 0000000000..d657fa5556 --- /dev/null +++ b/OracleLinuxDevelopers/oraclelinux8/php/8.0-cli/Dockerfile @@ -0,0 +1,16 @@ +# Copyright (c) 2023 Oracle and/or its affiliates. +# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. + +FROM ghcr.io/oracle/oraclelinux:8 + +RUN dnf -y module enable php:8.0 && \ + dnf -y install php-cli \ + php-common \ + php-json \ + php-mbstring \ + php-mysqlnd \ + php-pdo \ + php-xml && \ + rm -rf /var/cache/dnf + +CMD ["/bin/php", "-v"] diff --git a/OracleLinuxDevelopers/oraclelinux8/php/8.0-fpm/Dockerfile b/OracleLinuxDevelopers/oraclelinux8/php/8.0-fpm/Dockerfile new file mode 100644 index 0000000000..5c92274e2e --- /dev/null +++ b/OracleLinuxDevelopers/oraclelinux8/php/8.0-fpm/Dockerfile @@ -0,0 +1,30 @@ +# Copyright (c) 2023 Oracle and/or its affiliates. +# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. + +FROM ghcr.io/oracle/oraclelinux:8 + +RUN dnf -y module enable php:8.0 && \ + dnf -y install php-cli \ + php-common \ + php-fpm \ + php-json \ + php-mbstring \ + php-mysqlnd \ + php-pdo \ + php-soap \ + php-xml && \ + rm -rf /var/cache/dnf \ + && \ + # Enable external access to PHP-FPM + mkdir -p /run/php-fpm && \ + sed -i '/^listen = /clisten = 0.0.0.0:9000' /etc/php-fpm.d/www.conf && \ + sed -i '/^listen.allowed_clients/c;listen.allowed_clients =' /etc/php-fpm.d/www.conf \ + && \ + # Redirect worker output to stdout for container logging + sed -i '/^;catch_workers_output/ccatch_workers_output = yes' /etc/php-fpm.d/www.conf + +EXPOSE 9000 + +WORKDIR /var/www + +CMD ["/sbin/php-fpm", "-F", "-O"] diff --git a/OracleLinuxDevelopers/oraclelinux8/ruby/3.1/Dockerfile b/OracleLinuxDevelopers/oraclelinux8/ruby/3.1/Dockerfile new file mode 100644 index 0000000000..e88deca946 --- /dev/null +++ b/OracleLinuxDevelopers/oraclelinux8/ruby/3.1/Dockerfile @@ -0,0 +1,13 @@ +# Copyright (c) 2023 Oracle and/or its affiliates. +# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. + +FROM ghcr.io/oracle/oraclelinux:8 + + +RUN dnf -y module enable ruby:3.1 && \ + dnf -y install ruby ruby-libs ruby-devel ruby-irb \ + rubygems rubygem-rake rubygem-bundler \ + gcc make && \ + rm -rf /var/cache/dnf + +CMD ["irb"]