Skip to content

Commit

Permalink
Add NGINX images for each Oracle Linux 8 AppStream (oracle#2171)
Browse files Browse the repository at this point in the history
  • Loading branch information
Djelibeybi authored Oct 23, 2021
1 parent 8b0ab0a commit 7ef625d
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build-and-push-dev-images.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Build and publish Oracle Linux developer container images to GitHub Container Registry

# Builds are triggered either by:
# - a push on the master branch with changes in this file.
# - a push on the main branch with changes in this file.
# All container images will be (re)built.
# - a push on the master branch with changes the OracleLinuxDevelopers
# - a push on the main branch with changes the OracleLinuxDevelopers
# directory.
# Affected container images will be (re)built.
# - a manual trigger of the workflow using the API.
Expand All @@ -29,14 +29,14 @@ on:
required: false
lang:
description: List of languages to build
default: 'compat, golang, nodejs, php, python, ruby'
default: 'compat, golang, nginx, nodejs, php, python, ruby'
required: false

# Default values for the builds triggered by the push event
# Note: the "compat" image should *not* be in this list
env:
ol: 'oraclelinux7, oraclelinux8'
lang: 'golang, nodejs, php, python, ruby'
lang: 'golang, nodejs, nginx, php, python, ruby'

jobs:
prepare:
Expand Down
22 changes: 16 additions & 6 deletions OracleLinuxDevelopers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,20 @@ packages, they should be installed as part of your downstream `Dockerfile`.
Originally, the images based on Oracle Linux 8 used the `8-slim` variant which
required the use of `microdnf` for package management. The current images are
based on an intermediate base image that is based on `oraclelinux:8` for full
access to `dnf` to support AppStreams and modularity, but which also has
access to `dnf` to support AppStreams and modularity, but which also has
`microdnf` installed and configured to ensure any existing automation continues
to work.

> **Deprecation of `microdnf`:**
> **Deprecation of `microdnf`:**
> Existing users are strongly encouraged to switch from `microdnf` to `dnf` as
> it we intend to remove it from the Oracle Linux Developer images when Oracle Linux 8.5 is released.
> it we intend to remove it from the Oracle Linux Developer images when Oracle
> Linux 8.5 is released.
## Usage of the binary images

All the [published Oracle Linux Developer images](https://github.com/orgs/oracle/packages?repo_name=docker-images)
use publicly available packages from the [Oracle Linux yum server](https://yum.oracle.com).
No login, Oracle SSO account or permission is required to build, extend, use or distribute these images.
All the [published Oracle Linux Developer images][1] use publicly available
packages from the [Oracle Linux yum server][2]. No login, Oracle SSO account or
permission is required to build, extend, use or distribute these images.

## Oracle Database support

Expand Down Expand Up @@ -84,6 +85,12 @@ You should then be able to create a new Ruby on Rails application.

* [`oraclelinux8-golang:ol8`](oraclelinux8/golang/ol8/Dockerfile)

### 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)

### Node.js module

* [`oraclelinux8-nodejs:12`](oraclelinux8/nodejs/12/Dockerfile)
Expand Down Expand Up @@ -125,3 +132,6 @@ You should then be able to create a new Ruby on Rails application.
* [`oraclelinux8-ruby:2.6`](oraclelinux8/ruby/2.6/Dockerfile)
* [`oraclelinux8-ruby:2.7`](oraclelinux8/ruby/2.7/Dockerfile)
* [`oraclelinux8-ruby:2.7-nodejs`](oraclelinux8/ruby/2.7-nodejs/Dockerfile)

[1]: https://github.com/orgs/oracle/packages?repo_name=docker-images
[2]: https://yum.oracle.com
23 changes: 23 additions & 0 deletions OracleLinuxDevelopers/oraclelinux8/nginx/1.14/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright (c) 2021, 2021 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.14 && \
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;"]
23 changes: 23 additions & 0 deletions OracleLinuxDevelopers/oraclelinux8/nginx/1.16/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright (c) 2021, 2021 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.16 && \
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;"]
23 changes: 23 additions & 0 deletions OracleLinuxDevelopers/oraclelinux8/nginx/1.18/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright (c) 2021, 2021 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.18 && \
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;"]

0 comments on commit 7ef625d

Please sign in to comment.