Skip to content

Commit

Permalink
OracleLinux
Browse files Browse the repository at this point in the history
  • Loading branch information
bromine0x23 committed Nov 15, 2023
1 parent e767334 commit 81de029
Show file tree
Hide file tree
Showing 14 changed files with 320 additions and 17 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/debian.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Debian 镜像构建
name: Debian 镜像

on:
push:
Expand All @@ -18,10 +18,10 @@ jobs:
name: Debian
strategy:
matrix:
debian-version: ['12', '11']
debian-version: [12, 11]
is-slim: [false, true]
include:
- debian-latest-version: '12'
- debian-latest-version: 12
with:
image-label-title: Debian
image-label-description: Debian 系统基础镜像
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/fedora.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Fedora 镜像构建
name: Fedora 镜像

on:
push:
Expand All @@ -18,10 +18,10 @@ jobs:
name: Fedora
strategy:
matrix:
fedora-version: ['39', '38']
fedora-version: [39, 38]
is-slim: [false, true]
include:
- fedora-latest-version: '39'
- fedora-latest-version: 39
with:
image-label-title: Fedora
image-label-description: Fedora 系统基础镜像
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/oraclelinux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: OracleLinux 镜像

on:
push:
branches:
- main
paths:
- oraclelinux/**
- '!oraclelinux/README.md'
- .github/workflows/image-build.yml
- .github/workflows/oraclelinux.yml
schedule:
- cron: '0 8 1 * *'

jobs:
oraclelinux:
uses: ./.github/workflows/image-build.yml
name: OracleLinux
strategy:
matrix:
oraclelinux-version: [9, 8, 7]
is-slim: [false, true]
include:
- oraclelinux-latest-version: 9
- oraclelinux-version: 9
dnf: microdnf
- oraclelinux-version: 8
dnf: microdnf
with:
image-label-title: OracleLinux
image-label-description: OracleLinux 系统基础镜像
image-label-version: "${{ matrix.oraclelinux-version }}"
image-build-context: ./debian/${{ matrix.oraclelinux-version }}
image-build-args: |
BASE_IMAGE=oraclelinux:${{ matrix.oraclelinux-version }}-slim
IS_SLIM=${{ matrix.is-slim && 'slim' || '' }}
${{ matrix.dnf && format('DNF={0}', matrix.dnf) || '' }}
image-name: >-
bromine0x23/oraclelinux
ghcr.io/bromine0x23/oraclelinux
image-tag: >-
${{ matrix.oraclelinux-version }}${{ matrix.is-slim && '-slim' || '' }}
${{ matrix.oraclelinux-version == matrix.oraclelinux-latest-version && (matrix.is-slim && 'slim' || 'latest') || '' }}
secrets: inherit
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Container Images

* [Debian](debian)
* [Fedora](fedora)
* [Fedora](fedora)
* [OracleLinux](oraclelinux)
4 changes: 2 additions & 2 deletions debian/11/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ ARG LOCALE_COUNTRY=CN
ARG LOCALE_CHARMAP=UTF-8
ARG LOCALE_TIMEZONE=Asia/Shanghai

ENV TZ ${LOCALE_TIMEZONE}
ENV LANG ${LOCALE_LANGUAGE}_${LOCALE_COUNTRY}.${LOCALE_CHARMAP}
ENV LANG ${LOCALE_LANGUAGE}_${LOCALE_COUNTRY}.${LOCALE_CHARMAP}
ENV TZ ${LOCALE_TIMEZONE}

# for DL4006: https://github.com/hadolint/hadolint/wiki/DL4006
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
Expand Down
4 changes: 2 additions & 2 deletions debian/12/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ ARG LOCALE_COUNTRY=CN
ARG LOCALE_CHARMAP=UTF-8
ARG LOCALE_TIMEZONE=Asia/Shanghai

ENV TZ ${LOCALE_TIMEZONE}
ENV LANG ${LOCALE_LANGUAGE}_${LOCALE_COUNTRY}.${LOCALE_CHARMAP}
ENV LANG ${LOCALE_LANGUAGE}_${LOCALE_COUNTRY}.${LOCALE_CHARMAP}
ENV TZ ${LOCALE_TIMEZONE}

# for DL4006: https://github.com/hadolint/hadolint/wiki/DL4006
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
Expand Down
2 changes: 1 addition & 1 deletion debian/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Debian Container Image
[![Debian 镜像构建](https://github.com/bromine0x23/container-images/actions/workflows/debian.yml/badge.svg)](https://github.com/bromine0x23/container-images/actions/workflows/debian.yml)
[![Debian 镜像](https://github.com/bromine0x23/container-images/actions/workflows/debian.yml/badge.svg)](https://github.com/bromine0x23/container-images/actions/workflows/debian.yml)

基于[官方 Debian 镜像](https://hub.docker.com/_/debian)

Expand Down
4 changes: 2 additions & 2 deletions fedora/38/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ ARG LOCALE_COUNTRY=CN
ARG LOCALE_CHARMAP=UTF-8
ARG LOCALE_TIMEZONE=Asia/Shanghai

ENV TZ ${LOCALE_TIMEZONE}
ENV LANG ${LOCALE_LANGUAGE}_${LOCALE_COUNTRY}.${LOCALE_CHARMAP}
ENV LANG ${LOCALE_LANGUAGE}_${LOCALE_COUNTRY}.${LOCALE_CHARMAP}
ENV TZ ${LOCALE_TIMEZONE}

# for DL4006: https://github.com/hadolint/hadolint/wiki/DL4006
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
Expand Down
4 changes: 2 additions & 2 deletions fedora/39/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ ARG LOCALE_COUNTRY=CN
ARG LOCALE_CHARMAP=UTF-8
ARG LOCALE_TIMEZONE=Asia/Shanghai

ENV TZ ${LOCALE_TIMEZONE}
ENV LANG ${LOCALE_LANGUAGE}_${LOCALE_COUNTRY}.${LOCALE_CHARMAP}
ENV LANG ${LOCALE_LANGUAGE}_${LOCALE_COUNTRY}.${LOCALE_CHARMAP}
ENV TZ ${LOCALE_TIMEZONE}

# for DL4006: https://github.com/hadolint/hadolint/wiki/DL4006
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
Expand Down
2 changes: 1 addition & 1 deletion fedora/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Fedora Container Image
[![Fedora 镜像构建](https://github.com/bromine0x23/container-images/actions/workflows/fedora.yml/badge.svg)](https://github.com/bromine0x23/container-images/actions/workflows/fedora.yml)
[![Fedora 镜像](https://github.com/bromine0x23/container-images/actions/workflows/fedora.yml/badge.svg)](https://github.com/bromine0x23/container-images/actions/workflows/fedora.yml)

基于[官方 Fedora 镜像](https://hub.docker.com/_/fedora)

Expand Down
78 changes: 78 additions & 0 deletions oraclelinux/7/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
ARG BASE_IMAGE=oraclelinux:7

# hadolint ignore=DL3006
FROM $BASE_IMAGE

ARG IS_SLIM=
ARG DNF=dnf

ARG LOCALE_LANGUAGE=zh
ARG LOCALE_COUNTRY=CN
ARG LOCALE_CHARMAP=UTF-8
ARG LOCALE_TIMEZONE=Asia/Shanghai

ENV LANG ${LOCALE_LANGUAGE}_${LOCALE_COUNTRY}.${LOCALE_CHARMAP}
ENV TZ ${LOCALE_TIMEZONE}

# for DL4006: https://github.com/hadolint/hadolint/wiki/DL4006
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# hadolint ignore=DL3039,DL3041
RUN set -o errexit -o nounset -o xtrace \
&& yum repolist \
# 设置时区
&& ln -sf /usr/share/zoneinfo/${LOCALE_TIMEZONE} /etc/localtime \
# 设置语言环境
&& echo "override_install_langs=en_US.utf8:${LOCALE_LANGUAGE}_${LOCALE_COUNTRY}" >> /etc/yum.conf \
&& yum -y reinstall \
glibc-common \
# 安装翻译
&& if [ "${IS_SLIM}" == '' ]; then \
yum -y reinstall \
bash \
coreutils \
findutils \
grep \
sed \
shadow-utils \
yum \
; \
fi \
# 检查可升级软件包
&& (yum check-update || true) \
# 升级重要的或者有安全漏洞的软件包
&& yum -y update \
ca-certificates \
yum \
openssl-libs \
python-libs \
# 安装常用工具
&& if [ "${IS_SLIM}" == '' ]; then \
yum -y install --setopt=tsflags=nodocs \
bash \
bash-completion \
bind-utils \
binutils \
bzip2 \
curl \
gettext \
gzip \
htop \
iputils \
less \
nano \
net-tools \
procps-ng \
sudo \
tar \
telnet \
traceroute \
unzip \
vim \
wget \
xz \
zlib \
; \
fi \
&& yum -y clean all \
&& rm -rf /var/cache/yum
74 changes: 74 additions & 0 deletions oraclelinux/8/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
ARG BASE_IMAGE=oraclelinux:8

# hadolint ignore=DL3006
FROM $BASE_IMAGE

ARG IS_SLIM=
ARG DNF=dnf

ARG LOCALE_LANGUAGE=zh
ARG LOCALE_COUNTRY=CN
ARG LOCALE_CHARMAP=UTF-8
ARG LOCALE_TIMEZONE=Asia/Shanghai

ENV LANG ${LOCALE_LANGUAGE}_${LOCALE_COUNTRY}.${LOCALE_CHARMAP}
ENV TZ ${LOCALE_TIMEZONE}

# for DL4006: https://github.com/hadolint/hadolint/wiki/DL4006
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# hadolint ignore=DL3039,DL3041
RUN set -o errexit -o nounset -o xtrace \
&& ${DNF} repolist \
# 设置时区
&& ln -sf /usr/share/zoneinfo/${LOCALE_TIMEZONE} /etc/localtime \
# 设置语言环境
&& ${DNF} -y install --nodocs --setopt='tsflags=nodocs' \
dnf \
langpacks-zh_CN \
glibc-langpack-zh \
# 检查可升级软件包
&& (dnf check-update || true) \
# 升级重要的或者有安全漏洞的软件包
&& dnf -y update \
ca-certificates \
dnf \
microdnf \
libgcrypt \
gnutls \
python3-libs \
# 安装常用工具
&& if [ "${IS_SLIM}" == '' ]; then \
dnf -y --best install --nodocs --setopt='tsflags=nodocs' \
bash \
bash-completion \
bind-utils \
binutils \
bzip2 \
curl \
dnf-plugins-core \
findutils \
gettext \
gzip \
htop \
iputils \
less \
nano \
net-tools \
procps-ng \
shadow-utils \
sudo \
tar \
telnet \
traceroute \
unzip \
vim \
wget \
xz \
yum \
zlib \
; \
fi \
&& dnf -y clean all \
&& rm -rf /var/cache/dnf \
&& rm -rf /var/cache/yum
66 changes: 66 additions & 0 deletions oraclelinux/9/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
ARG BASE_IMAGE=oraclelinux:9

# hadolint ignore=DL3006
FROM $BASE_IMAGE

ARG IS_SLIM=
ARG DNF=dnf

ARG LOCALE_LANGUAGE=zh
ARG LOCALE_COUNTRY=CN
ARG LOCALE_CHARMAP=UTF-8
ARG LOCALE_TIMEZONE=Asia/Shanghai

ENV LANG ${LOCALE_LANGUAGE}_${LOCALE_COUNTRY}.${LOCALE_CHARMAP}
ENV TZ ${LOCALE_TIMEZONE}

# for DL4006: https://github.com/hadolint/hadolint/wiki/DL4006
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# hadolint ignore=DL3039,DL3041
RUN set -o errexit -o nounset -o xtrace \
&& ${DNF} repolist \
# 设置时区
&& ln -sf /usr/share/zoneinfo/${LOCALE_TIMEZONE} /etc/localtime \
# 设置语言环境
&& ${DNF} -y install --nodocs --setopt='tsflags=nodocs' \
dnf \
glibc-langpack-zh \
# 检查可升级软件包
&& (dnf check-update || true) \
# 升级重要的或者有安全漏洞的软件包
&& dnf -y update \
ca-certificates \
dnf \
# 安装常用工具
&& if [ "${IS_SLIM}" == '' ]; then \
dnf -y install --best --nodocs --setopt='tsflags=nodocs' \
bash-completion \
bind-utils \
binutils \
bzip2 \
curl \
findutils \
gettext \
gzip \
htop \
iputils \
less \
nano \
net-tools \
procps-ng \
shadow-utils \
sudo \
tar \
telnet \
traceroute \
unzip \
vim \
wget \
xz \
zlib \
; \
fi \
&& dnf -y clean all \
&& rm -rf /var/cache/dnf \
&& rm -rf /var/cache/yum
Loading

0 comments on commit 81de029

Please sign in to comment.