mirror of
https://github.com/clearlinux/dockerfiles.git
synced 2026-08-04 02:37:24 +00:00
Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d8cebc8dc7 | |||
| 65634bce18 | |||
| d7d7323c69 | |||
| 31b61ab310 | |||
| 52fb1c147e | |||
| 416e85767f | |||
| e1d7e33abe | |||
| 78b66a1980 | |||
| eeaa2f4a8a | |||
| 7fcefddb0a | |||
| 6bda9b187f | |||
| e44821c40f | |||
| f348aa4d2f | |||
| c9434359c7 | |||
| 5a0a2fb808 | |||
| 13117a3da2 | |||
| 114295de66 | |||
| a4c1b74808 | |||
| 14fd212808 | |||
| f865f549b7 | |||
| c8ca992dfa |
@@ -0,0 +1,45 @@
|
||||
name: Dockerfiles Release
|
||||
on: create
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
|
||||
cancel-in-progress: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
|
||||
jobs:
|
||||
release-pre-reqs:
|
||||
if: (github.event_name == 'create' && github.event.ref_type == 'tag')
|
||||
name: Release image required by other images
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Code Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build and Push os-core
|
||||
run: ./build-and-push-images.sh os-core ${{ github.event.ref }}
|
||||
- name: Build and Push httpd
|
||||
run: ./build-and-push-images.sh httpd ${{ github.event.ref }}
|
||||
release-matrix:
|
||||
needs: release-pre-reqs
|
||||
if: (github.event_name == 'create' && github.event.ref_type == 'tag')
|
||||
name: Release Matrix
|
||||
strategy:
|
||||
matrix:
|
||||
image: ['cgit', 'golang', 'haproxy', 'iperf', 'mariadb', 'memcached', 'nginx', 'node', 'numpy-mp', 'perl', 'php', 'php-fpm', 'postgres', 'python', 'rabbitmq', 'r-base', 'ruby', 'tesseract-ocr', 'valkey']
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Code Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build and Push
|
||||
run: ./build-and-push-images.sh ${{ matrix.image }} ${{ github.event.ref }}
|
||||
@@ -18,7 +18,6 @@ jobs:
|
||||
- machine-learning-ui
|
||||
- mariadb
|
||||
- memcached
|
||||
- mixer-ci
|
||||
- nginx
|
||||
- node
|
||||
- openjdk/8
|
||||
@@ -30,14 +29,13 @@ jobs:
|
||||
- postgres
|
||||
- python
|
||||
- rabbitmq
|
||||
- redis
|
||||
- ruby
|
||||
- valkey
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: install
|
||||
run: |
|
||||
sudo apt-get purge moby-engine moby-cli
|
||||
sudo apt-get install docker.io bats -f
|
||||
run: |
|
||||
sudo apt-get install bats -f
|
||||
sudo modprobe -r overlay
|
||||
sudo modprobe overlay redirect_dir=off
|
||||
sudo systemctl restart docker
|
||||
@@ -45,6 +43,6 @@ jobs:
|
||||
run: |
|
||||
dir=$(pwd)
|
||||
cd ${{matrix.node}}
|
||||
docker build -t clearlinux/${{matrix.node}} .
|
||||
docker build -t ghcr.io/clearlinux/${{matrix.node}} .
|
||||
cd $dir
|
||||
if [ -d "./tests/${{matrix.node}}" ]; then cd tests; make ${{matrix.node}}; fi
|
||||
|
||||
@@ -23,7 +23,7 @@ It can leverage AVX512 advantage and set OMP_NUM_THREADS dynamically at runtime
|
||||
* Put the required python packages in the "requirements.txt".
|
||||
For example,
|
||||
|
||||
`echo "redis" >> numpy-openfaas/requirements.txt`
|
||||
`echo "valkey" >> numpy-openfaas/requirements.txt`
|
||||
`echo "flask" >> numpy-openfaas/requirements.txt`
|
||||
|
||||
* Put the required Clear Linux bundles in the "bundles.txt".
|
||||
|
||||
@@ -20,7 +20,7 @@ This template is based on [clearlinux/python:3](https://hub.docker.com/r/clearli
|
||||
* Put the required python packages in the "requirements.txt".
|
||||
For example,
|
||||
|
||||
`echo "redis" >> hello-openfaas/requirements.txt`
|
||||
`echo "valkey" >> hello-openfaas/requirements.txt`
|
||||
`echo "flask" >> hello-openfaas/requirements.txt`
|
||||
|
||||
* Put the required Clear Linux bundles in the "bundles.txt".
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
## DISCONTINUATION OF PROJECT.
|
||||
|
||||
This project will no longer be maintained by Intel.
|
||||
|
||||
Intel will not provide or guarantee development of or support for this project, including but not limited to, maintenance, bug fixes, new releases or updates. Patches to this project are no longer accepted by Intel. If you have an ongoing need to use this project, are interested in independently developing it, or would like to maintain patches for the community, please create your own fork of the project.
|
||||
|
||||
Contact: webadmin@linux.intel.com
|
||||
Clear Linux* based Docker Containers
|
||||
====================================
|
||||

|
||||
|
||||
This repository holds all the Dockerfiles for Clear Linux based containers that are hosted at:
|
||||
https://hub.docker.com/u/clearlinux/
|
||||
This repository holds all the Dockerfiles for Clear Linux based containers.
|
||||
|
||||
The base image can be found in Docker's base repository or at https://github.com/clearlinux/docker-brew-clearlinux/ (which also has previous image releases under branches).
|
||||
|
||||
Executable
+30
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eu -o pipefail
|
||||
|
||||
create_image() {
|
||||
local name="$1"
|
||||
local ver="$2"
|
||||
pushd "${name}"
|
||||
echo "Creating ${name} for version ${ver}"
|
||||
docker build -t ghcr.io/clearlinux/"${name}":latest . --build-arg="clear_ver=${ver}"
|
||||
popd
|
||||
}
|
||||
|
||||
push_image() {
|
||||
local name="$1"
|
||||
local ver="$2"
|
||||
echo "Pushing ${name} for version ${ver}"
|
||||
docker tag ghcr.io/clearlinux/"${name}":latest ghcr.io/clearlinux/"${name}":"${ver}"
|
||||
docker push ghcr.io/clearlinux/"${name}":latest
|
||||
docker push ghcr.io/clearlinux/"${name}":"${ver}"
|
||||
}
|
||||
|
||||
build_and_push_image() {
|
||||
local name="$1"
|
||||
local ver="$2"
|
||||
create_image "${name}" "${ver}"
|
||||
push_image "${name}" "${ver}"
|
||||
}
|
||||
|
||||
build_and_push_image $1 $2
|
||||
+7
-4
@@ -1,14 +1,17 @@
|
||||
ARG clear_ver
|
||||
FROM ghcr.io/clearlinux/httpd:$clear_ver AS httpd
|
||||
FROM clearlinux:latest AS builder
|
||||
|
||||
ARG clear_ver
|
||||
ARG swupd_args
|
||||
# Move to latest Clear Linux release to ensure
|
||||
# that the swupd command line arguments are
|
||||
# correct
|
||||
RUN swupd update --no-boot-update $swupd_args
|
||||
RUN swupd update --no-boot-update -V $clear_ver $swupd_args
|
||||
|
||||
# Grab os-release info from the minimal base image so
|
||||
# that the new content matches the exact OS version
|
||||
COPY --from=clearlinux/httpd:latest /usr/lib/os-release /
|
||||
COPY --from=httpd /usr/lib/os-release /
|
||||
|
||||
# Install additional content in a target directory
|
||||
# using the os version from the minimal base
|
||||
@@ -23,11 +26,11 @@ RUN source /os-release && \
|
||||
# file exists on different layers. To minimize docker
|
||||
# image size, remove the overlapped files before copy.
|
||||
RUN mkdir /os_core_install
|
||||
COPY --from=clearlinux/httpd:latest / /os_core_install/
|
||||
COPY --from=httpd / /os_core_install/
|
||||
RUN cd / && \
|
||||
find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true
|
||||
|
||||
FROM clearlinux/httpd:latest
|
||||
FROM httpd
|
||||
|
||||
COPY --from=builder /install_root /
|
||||
COPY cgitrc /etc/cgitrc
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
FROM clearlinux:latest
|
||||
ARG clear_ver
|
||||
|
||||
# Configure Go
|
||||
ENV GOPATH="/go" PATH="/go/bin:${PATH}"
|
||||
|
||||
# Update and add bundles
|
||||
RUN swupd update && \
|
||||
RUN swupd update -V $clear_ver && \
|
||||
swupd bundle-add sysadmin-basic storage-utils network-basic go-basic-dev devpkg-gtk3 clr-installer-gui && \
|
||||
swupd clean && \
|
||||
# Install the Go Linters
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ function do_tag {
|
||||
local image=$1
|
||||
local pkg=$2
|
||||
local base=$3
|
||||
|
||||
|
||||
echo "=> Tagging the $image"
|
||||
local tag=$(get_tag $pkg)
|
||||
|
||||
|
||||
+7
-4
@@ -1,14 +1,17 @@
|
||||
ARG clear_ver
|
||||
FROM ghcr.io/clearlinux/os-core:$clear_ver AS core
|
||||
FROM clearlinux:latest AS builder
|
||||
|
||||
ARG clear_ver
|
||||
ARG swupd_args
|
||||
# Move to latest Clear Linux release to ensure
|
||||
# that the swupd command line arguments are
|
||||
# correct
|
||||
RUN swupd update --no-boot-update $swupd_args
|
||||
RUN swupd update --no-boot-update -V $clear_ver $swupd_args
|
||||
|
||||
# Grab os-release info from the minimal base image so
|
||||
# that the new content matches the exact OS version
|
||||
COPY --from=clearlinux/os-core:latest /usr/lib/os-release /
|
||||
COPY --from=core /usr/lib/os-release /
|
||||
|
||||
# Install additional content in a target directory
|
||||
# using the os version from the minimal base
|
||||
@@ -23,11 +26,11 @@ RUN source /os-release && \
|
||||
# file exists on different layers. To minimize docker
|
||||
# image size, remove the overlapped files before copy.
|
||||
RUN mkdir /os_core_install
|
||||
COPY --from=clearlinux/os-core:latest / /os_core_install/
|
||||
COPY --from=core / /os_core_install/
|
||||
RUN cd / && \
|
||||
find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true
|
||||
|
||||
FROM clearlinux/os-core:latest
|
||||
FROM core
|
||||
|
||||
COPY --from=builder /install_root /
|
||||
|
||||
|
||||
+7
-4
@@ -1,14 +1,17 @@
|
||||
ARG clear_ver
|
||||
FROM ghcr.io/clearlinux/os-core:$clear_ver AS core
|
||||
FROM clearlinux:latest AS builder
|
||||
|
||||
ARG clear_ver
|
||||
ARG swupd_args
|
||||
# Move to latest Clear Linux release to ensure
|
||||
# that the swupd command line arguments are
|
||||
# correct
|
||||
RUN swupd update --no-boot-update $swupd_args
|
||||
RUN swupd update --no-boot-update -V $clear_ver $swupd_args
|
||||
|
||||
# Grab os-release info from the minimal base image so
|
||||
# that the new content matches the exact OS version
|
||||
COPY --from=clearlinux/os-core:latest /usr/lib/os-release /
|
||||
COPY --from=core /usr/lib/os-release /
|
||||
|
||||
# Install additional content in a target directory
|
||||
# using the os version from the minimal base
|
||||
@@ -23,12 +26,12 @@ RUN source /os-release && \
|
||||
# file exists on different layers. To minimize docker
|
||||
# image size, remove the overlapped files before copy.
|
||||
RUN mkdir /os_core_install
|
||||
COPY --from=clearlinux/os-core:latest / /os_core_install/
|
||||
COPY --from=core / /os_core_install/
|
||||
RUN cd / && \
|
||||
find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true
|
||||
|
||||
|
||||
FROM clearlinux/os-core:latest
|
||||
FROM core
|
||||
|
||||
COPY --from=builder /install_root /
|
||||
|
||||
|
||||
+7
-4
@@ -1,14 +1,17 @@
|
||||
ARG clear_ver
|
||||
FROM ghcr.io/clearlinux/os-core:$clear_ver AS core
|
||||
FROM clearlinux:latest AS builder
|
||||
|
||||
ARG clear_ver
|
||||
ARG swupd_args
|
||||
# Move to latest Clear Linux release to ensure
|
||||
# that the swupd command line arguments are
|
||||
# correct
|
||||
RUN swupd update --no-boot-update $swupd_args
|
||||
RUN swupd update --no-boot-update -V $clear_ver $swupd_args
|
||||
|
||||
# Grab os-release info from the minimal base image so
|
||||
# that the new content matches the exact OS version
|
||||
COPY --from=clearlinux/os-core:latest /usr/lib/os-release /
|
||||
COPY --from=core /usr/lib/os-release /
|
||||
|
||||
# Install additional content in a target directory
|
||||
# using the os version from the minimal base
|
||||
@@ -23,11 +26,11 @@ RUN source /os-release && \
|
||||
# file exists on different layers. To minimize docker
|
||||
# image size, remove the overlapped files before copy.
|
||||
RUN mkdir /os_core_install
|
||||
COPY --from=clearlinux/os-core:latest / /os_core_install/
|
||||
COPY --from=core / /os_core_install/
|
||||
RUN cd / && \
|
||||
find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true
|
||||
|
||||
FROM clearlinux/os-core:latest
|
||||
FROM core
|
||||
|
||||
COPY --from=builder /install_root /
|
||||
|
||||
|
||||
+7
-4
@@ -1,14 +1,17 @@
|
||||
ARG clear_ver
|
||||
FROM ghcr.io/clearlinux/os-core:$clear_ver AS core
|
||||
FROM clearlinux:latest AS builder
|
||||
|
||||
ARG clear_ver
|
||||
ARG swupd_args
|
||||
# Move to latest Clear Linux release to ensure
|
||||
# that the swupd command line arguments are
|
||||
# correct
|
||||
RUN swupd update --no-boot-update $swupd_args
|
||||
RUN swupd update --no-boot-update -V $clear_ver $swupd_args
|
||||
|
||||
# Grab os-release info from the minimal base image so
|
||||
# that the new content matches the exact OS version
|
||||
COPY --from=clearlinux/os-core:latest /usr/lib/os-release /
|
||||
COPY --from=core /usr/lib/os-release /
|
||||
|
||||
# Install additional content in a target directory
|
||||
# using the os version from the minimal base
|
||||
@@ -23,12 +26,12 @@ RUN source /os-release && \
|
||||
# file exists on different layers. To minimize docker
|
||||
# image size, remove the overlapped files before copy.
|
||||
RUN mkdir /os_core_install
|
||||
COPY --from=clearlinux/os-core:latest / /os_core_install/
|
||||
COPY --from=core / /os_core_install/
|
||||
RUN cd / && \
|
||||
find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true
|
||||
|
||||
|
||||
FROM clearlinux/os-core:latest
|
||||
FROM core
|
||||
|
||||
COPY --from=builder /install_root /
|
||||
|
||||
|
||||
+7
-4
@@ -1,15 +1,18 @@
|
||||
ARG clear_ver
|
||||
FROM ghcr.io/clearlinux/os-core:$clear_ver AS core
|
||||
FROM clearlinux:latest as builder
|
||||
|
||||
ARG clear_ver
|
||||
ARG swupd_args
|
||||
|
||||
# Move to latest Clear Linux release to ensure
|
||||
# that the swupd command line arguments are
|
||||
# correct
|
||||
RUN swupd update --no-boot-update $swupd_args
|
||||
RUN swupd update --no-boot-update -V $clear_ver $swupd_args
|
||||
|
||||
# Grab os-release info from the minimal base image so
|
||||
# that the new content matches the exact OS version
|
||||
COPY --from=clearlinux/os-core:latest /usr/lib/os-release /
|
||||
COPY --from=core /usr/lib/os-release /
|
||||
|
||||
# Install additional content in a target directory
|
||||
# using the os version from the minimal base
|
||||
@@ -24,11 +27,11 @@ RUN source /os-release && \
|
||||
# file exists on different layers. To minimize docker
|
||||
# image size, remove the overlapped files before copy.
|
||||
RUN mkdir /os_core_install
|
||||
COPY --from=clearlinux/os-core:latest / /os_core_install/
|
||||
COPY --from=core / /os_core_install/
|
||||
RUN cd / && \
|
||||
find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true
|
||||
|
||||
FROM clearlinux/os-core:latest
|
||||
FROM core
|
||||
|
||||
COPY --from=builder /install_root /
|
||||
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
ARG clear_ver
|
||||
FROM ghcr.io/clearlinux/os-core:$clear_ver AS core
|
||||
FROM clearlinux:latest AS builder
|
||||
|
||||
ARG clear_ver
|
||||
ARG swupd_args
|
||||
# Move to latest Clear Linux release to ensure
|
||||
# that the swupd command line arguments are
|
||||
# correct
|
||||
RUN swupd update --no-boot-update $swupd_args
|
||||
RUN swupd update --no-boot-update -V $clear_ver $swupd_args
|
||||
|
||||
# Grab os-release info from the minimal base image so
|
||||
# that the new content matches the exact OS version
|
||||
COPY --from=clearlinux/os-core:latest /usr/lib/os-release /
|
||||
COPY --from=core /usr/lib/os-release /
|
||||
|
||||
# Install additional content in a target directory
|
||||
# using the os version from the minimal base
|
||||
@@ -23,11 +26,11 @@ RUN source /os-release && \
|
||||
# file exists on different layers. To minimize docker
|
||||
# image size, remove the overlapped files before copy.
|
||||
RUN mkdir /os_core_install
|
||||
COPY --from=clearlinux/os-core:latest / /os_core_install/
|
||||
COPY --from=core / /os_core_install/
|
||||
RUN cd / && \
|
||||
find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true
|
||||
|
||||
FROM clearlinux/os-core:latest
|
||||
FROM core
|
||||
|
||||
COPY --from=builder /install_root /
|
||||
|
||||
|
||||
+38
-10
@@ -1,16 +1,44 @@
|
||||
FROM clearlinux:latest
|
||||
ARG clear_ver
|
||||
FROM ghcr.io/clearlinux/os-core:$clear_ver AS core
|
||||
FROM clearlinux:latest AS builder
|
||||
|
||||
ARG clear_ver
|
||||
ARG swupd_args
|
||||
# Move to latest Clear Linux release to ensure
|
||||
# that the swupd command line arguments are
|
||||
# correct
|
||||
RUN swupd update --no-boot-update -V $clear_ver $swupd_args
|
||||
|
||||
# Grab os-release info from the minimal base image so
|
||||
# that the new content matches the exact OS version
|
||||
COPY --from=core /usr/lib/os-release /
|
||||
|
||||
# Install additional content in a target directory
|
||||
# using the os version from the minimal base
|
||||
RUN source /os-release && \
|
||||
mkdir /install_root \
|
||||
&& swupd os-install -V ${VERSION_ID} \
|
||||
--path /install_root --statedir /swupd-state \
|
||||
--bundles=mixer,go-basic,c-basic,os-core-update-dev,sudo --no-boot-update
|
||||
|
||||
# For some Host OS configuration with redirect_dir on,
|
||||
# extra data are saved on the upper layer when the same
|
||||
# file exists on different layers. To minimize docker
|
||||
# image size, remove the overlapped files before copy.
|
||||
RUN mkdir /os_core_install
|
||||
COPY --from=core / /os_core_install/
|
||||
RUN cd / && \
|
||||
find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true
|
||||
|
||||
FROM core
|
||||
|
||||
COPY --from=builder /install_root /
|
||||
|
||||
RUN useradd -G wheelnopw clr && mkdir -p /run/lock
|
||||
|
||||
# Configure Go
|
||||
ENV GOPATH /home/clr/go
|
||||
ENV PATH="/home/clr/go/bin:${PATH}"
|
||||
|
||||
# Update and add bundles
|
||||
RUN swupd update && \
|
||||
swupd bundle-add mixer go-basic c-basic os-core-update-dev sudo && \
|
||||
useradd -G wheelnopw clr && \
|
||||
mkdir -p /run/lock
|
||||
USER clr
|
||||
RUN git config --global user.email "travis@example.com" && \
|
||||
git config --global user.name "Travis CI" && \
|
||||
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.18.0
|
||||
|
||||
git config --global user.name "Travis CI"
|
||||
|
||||
+20
-22
@@ -1,14 +1,17 @@
|
||||
ARG clear_ver
|
||||
FROM ghcr.io/clearlinux/os-core:$clear_ver AS core
|
||||
FROM clearlinux:latest AS builder
|
||||
|
||||
ARG clear_ver
|
||||
ARG swupd_args
|
||||
# Move to latest Clear Linux release to ensure
|
||||
# that the swupd command line arguments are
|
||||
# correct
|
||||
RUN swupd update --no-boot-update $swupd_args
|
||||
RUN swupd update --no-boot-update -V $clear_ver $swupd_args
|
||||
|
||||
# Grab os-release info from the minimal base image so
|
||||
# that the new content matches the exact OS version
|
||||
COPY --from=clearlinux/os-core:latest /usr/lib/os-release /
|
||||
COPY --from=core /usr/lib/os-release /
|
||||
|
||||
# Install additional content in a target directory
|
||||
# using the os version from the minimal base
|
||||
@@ -16,40 +19,35 @@ RUN source /os-release && \
|
||||
mkdir /install_root \
|
||||
&& swupd os-install -V ${VERSION_ID} \
|
||||
--path /install_root --statedir /swupd-state \
|
||||
--bundles=nginx-mainline --no-boot-update
|
||||
--bundles=nginx --no-boot-update
|
||||
|
||||
# For some Host OS configuration with redirect_dir on,
|
||||
# extra data are saved on the upper layer when the same
|
||||
# file exists on different layers. To minimize docker
|
||||
# image size, remove the overlapped files before copy.
|
||||
RUN mkdir /os_core_install
|
||||
COPY --from=clearlinux/os-core:latest / /os_core_install/
|
||||
COPY --from=core / /os_core_install/
|
||||
RUN cd / && \
|
||||
find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true
|
||||
|
||||
FROM clearlinux/os-core:latest
|
||||
FROM core
|
||||
|
||||
COPY --from=builder /install_root /
|
||||
COPY default.conf /etc/nginx-mainline/conf.d/default.conf
|
||||
COPY default.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
# create directories for nginx-mainline
|
||||
# create directories for nginx
|
||||
RUN mkdir -p /var/www/html && \
|
||||
mkdir -p /etc/nginx-mainline && \
|
||||
mkdir -p /var/log/nginx-mainline && \
|
||||
mkdir -p /var/lib/nginx-mainline/uwsgi && \
|
||||
mkdir -p /var/lib/nginx-mainline/client-body && \
|
||||
mkdir -p /var/lib/nginx-mainline/proxy && \
|
||||
mkdir -p /var/lib/nginx-mainline/fast-cgi && \
|
||||
# add links to make it compatible with general name nginx
|
||||
ln -sf /var/log/nginx-mainline /var/log/nginx && \
|
||||
ln -sf /var/lib/nginx-mainline /var/lib/nginx && \
|
||||
ln -sf /etc/nginx-mainline /etc/nginx && \
|
||||
ln -sf /usr/bin/nginx-mainline /usr/bin/nginx && \
|
||||
mkdir -p /etc/nginx && \
|
||||
mkdir -p /var/log/nginx && \
|
||||
mkdir -p /var/lib/nginx/uwsgi && \
|
||||
mkdir -p /var/lib/nginx/client-body && \
|
||||
mkdir -p /var/lib/nginx/proxy && \
|
||||
mkdir -p /var/lib/nginx/fast-cgi && \
|
||||
# forward request and error logs to docker log collector
|
||||
ln -sf /dev/stdout /var/log/nginx-mainline/access.log && \
|
||||
ln -sf /dev/stderr /var/log/nginx-mainline/error.log && \
|
||||
cp -f /usr/share/nginx-mainline/conf/nginx.conf.example /etc/nginx-mainline/nginx.conf && \
|
||||
cp -f /usr/share/nginx-mainline/html/* /var/www/html/
|
||||
ln -sf /dev/stdout /var/log/nginx/access.log && \
|
||||
ln -sf /dev/stderr /var/log/nginx/error.log && \
|
||||
cp -f /usr/share/nginx/conf/nginx.conf.example /etc/nginx/nginx.conf && \
|
||||
cp -f /usr/share/nginx/html/* /var/www/html/
|
||||
|
||||
EXPOSE 80
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
+1
-1
@@ -3,6 +3,6 @@ server {
|
||||
location / {
|
||||
root /var/www/html;
|
||||
autoindex on;
|
||||
access_log /var/log/nginx-mainline/access.log combined;
|
||||
access_log /var/log/nginx/access.log combined;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
. ../docker-hooks.sh
|
||||
|
||||
image="clearlinux/nginx"
|
||||
package=nginx-mainline
|
||||
package=nginx
|
||||
|
||||
do_tag $image $package
|
||||
|
||||
+7
-4
@@ -1,14 +1,17 @@
|
||||
ARG clear_ver
|
||||
FROM ghcr.io/clearlinux/os-core:$clear_ver AS core
|
||||
FROM clearlinux:latest AS builder
|
||||
|
||||
ARG clear_ver
|
||||
ARG swupd_args
|
||||
# Move to latest Clear Linux release to ensure
|
||||
# that the swupd command line arguments are
|
||||
# correct
|
||||
RUN swupd update --no-boot-update $swupd_args
|
||||
RUN swupd update --no-boot-update -V $clear_ver $swupd_args
|
||||
|
||||
# Grab os-release info from the minimal base image so
|
||||
# that the new content matches the exact OS version
|
||||
COPY --from=clearlinux/os-core:latest /usr/lib/os-release /
|
||||
COPY --from=core /usr/lib/os-release /
|
||||
|
||||
# Install additional content in a target directory
|
||||
# using the os version from the minimal base
|
||||
@@ -23,12 +26,12 @@ RUN source /os-release && \
|
||||
# file exists on different layers. To minimize docker
|
||||
# image size, remove the overlapped files before copy.
|
||||
RUN mkdir /os_core_install
|
||||
COPY --from=clearlinux/os-core:latest / /os_core_install/
|
||||
COPY --from=core / /os_core_install/
|
||||
RUN cd / && \
|
||||
find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true
|
||||
|
||||
|
||||
FROM clearlinux/os-core:latest
|
||||
FROM core
|
||||
|
||||
COPY --from=builder /install_root /
|
||||
|
||||
|
||||
+7
-4
@@ -1,14 +1,17 @@
|
||||
ARG clear_ver
|
||||
FROM ghcr.io/clearlinux/os-core:$clear_ver AS core
|
||||
FROM clearlinux:latest AS builder
|
||||
|
||||
ARG clear_ver
|
||||
ARG swupd_args
|
||||
# Move to latest Clear Linux release to ensure
|
||||
# that the swupd command line arguments are
|
||||
# correct
|
||||
RUN swupd update --no-boot-update $swupd_args
|
||||
RUN swupd update --no-boot-update -V $clear_ver $swupd_args
|
||||
|
||||
# Grab os-release info from the minimal base image so
|
||||
# that the new content matches the exact OS version
|
||||
COPY --from=clearlinux/os-core:latest /usr/lib/os-release /
|
||||
COPY --from=core /usr/lib/os-release /
|
||||
|
||||
# Install additional content in a target directory
|
||||
# using the os version from the minimal base
|
||||
@@ -23,11 +26,11 @@ RUN source /os-release && \
|
||||
# file exists on different layers. To minimize docker
|
||||
# image size, remove the overlapped files before copy.
|
||||
RUN mkdir /os_core_install
|
||||
COPY --from=clearlinux/os-core:latest / /os_core_install/
|
||||
COPY --from=core / /os_core_install/
|
||||
RUN cd / && \
|
||||
find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true
|
||||
|
||||
FROM clearlinux/os-core:latest
|
||||
FROM core
|
||||
|
||||
COPY --from=builder /install_root /
|
||||
|
||||
|
||||
+2
-1
@@ -1,9 +1,10 @@
|
||||
FROM clearlinux:latest AS builder
|
||||
|
||||
ARG clear_ver
|
||||
ARG swupd_args
|
||||
|
||||
# Move to latest Clear Linux release
|
||||
RUN swupd update --no-boot-update $swupd_args
|
||||
RUN swupd update --no-boot-update -V $clear_ver $swupd_args
|
||||
|
||||
# Install clean os-core bundle in target directory
|
||||
# using the new os version
|
||||
|
||||
+8
-5
@@ -1,14 +1,17 @@
|
||||
ARG clear_ver
|
||||
FROM ghcr.io/clearlinux/os-core:$clear_ver AS core
|
||||
FROM clearlinux:latest AS builder
|
||||
|
||||
ARG clear_ver
|
||||
ARG swupd_args
|
||||
# Move to latest Clear Linux release to ensure
|
||||
# that the swupd command line arguments are
|
||||
# correct
|
||||
RUN swupd update --no-boot-update $swupd_args
|
||||
RUN swupd update --no-boot-update -V $clear_ver $swupd_args
|
||||
|
||||
# Grab os-release info from the minimal base image so
|
||||
# that the new content matches the exact OS version
|
||||
COPY --from=clearlinux/os-core:latest /usr/lib/os-release /
|
||||
COPY --from=core /usr/lib/os-release /
|
||||
|
||||
# Install additional content in a target directory
|
||||
# using the os version from the minimal base
|
||||
@@ -23,14 +26,14 @@ RUN source /os-release && \
|
||||
# file exists on different layers. To minimize docker
|
||||
# image size, remove the overlapped files before copy.
|
||||
RUN mkdir /os_core_install
|
||||
COPY --from=clearlinux/os-core:latest / /os_core_install/
|
||||
COPY --from=core / /os_core_install/
|
||||
RUN cd / && \
|
||||
find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true
|
||||
|
||||
FROM clearlinux/os-core:latest
|
||||
FROM core
|
||||
|
||||
COPY --from=builder /install_root /
|
||||
|
||||
WORKDIR /root
|
||||
|
||||
CMD ["perl5.28.2","-de0"]
|
||||
CMD ["perl","-de0"]
|
||||
|
||||
+7
-4
@@ -1,14 +1,17 @@
|
||||
ARG clear_ver
|
||||
FROM ghcr.io/clearlinux/os-core:$clear_ver AS core
|
||||
FROM clearlinux:latest AS builder
|
||||
|
||||
ARG clear_ver
|
||||
ARG swupd_args
|
||||
# Move to latest Clear Linux release to ensure
|
||||
# that the swupd command line arguments are
|
||||
# correct
|
||||
RUN swupd update --no-boot-update $swupd_args
|
||||
RUN swupd update --no-boot-update -V $clear_ver $swupd_args
|
||||
|
||||
# Grab os-release info from the minimal base image so
|
||||
# that the new content matches the exact OS version
|
||||
COPY --from=clearlinux/os-core:latest /usr/lib/os-release /
|
||||
COPY --from=core /usr/lib/os-release /
|
||||
|
||||
# Install additional content in a target directory
|
||||
# using the os version from the minimal base
|
||||
@@ -23,12 +26,12 @@ RUN source /os-release && \
|
||||
# file exists on different layers. To minimize docker
|
||||
# image size, remove the overlapped files before copy.
|
||||
RUN mkdir /os_core_install
|
||||
COPY --from=clearlinux/os-core:latest / /os_core_install/
|
||||
COPY --from=core / /os_core_install/
|
||||
RUN cd / && \
|
||||
find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true
|
||||
|
||||
|
||||
FROM clearlinux/os-core:latest
|
||||
FROM core
|
||||
|
||||
COPY --from=builder /install_root /
|
||||
|
||||
|
||||
+7
-4
@@ -1,14 +1,17 @@
|
||||
ARG clear_ver
|
||||
FROM ghcr.io/clearlinux/os-core:$clear_ver AS core
|
||||
FROM clearlinux:latest AS builder
|
||||
|
||||
ARG clear_ver
|
||||
ARG swupd_args
|
||||
# Move to latest Clear Linux release to ensure
|
||||
# that the swupd command line arguments are
|
||||
# correct
|
||||
RUN swupd update --no-boot-update $swupd_args
|
||||
RUN swupd update --no-boot-update -V $clear_ver $swupd_args
|
||||
|
||||
# Grab os-release info from the minimal base image so
|
||||
# that the new content matches the exact OS version
|
||||
COPY --from=clearlinux/os-core:latest /usr/lib/os-release /
|
||||
COPY --from=core /usr/lib/os-release /
|
||||
|
||||
# Install additional content in a target directory
|
||||
# using the os version from the minimal base
|
||||
@@ -32,11 +35,11 @@ opcache.revalidate_freq=${OPCACHE_REVALIDATE_FREQ}' >> /install_root/usr/share/d
|
||||
# file exists on different layers. To minimize docker
|
||||
# image size, remove the overlapped files before copy.
|
||||
RUN mkdir /os_core_install
|
||||
COPY --from=clearlinux/os-core:latest / /os_core_install/
|
||||
COPY --from=core / /os_core_install/
|
||||
RUN cd / && \
|
||||
find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true
|
||||
|
||||
FROM clearlinux/os-core:latest
|
||||
FROM core
|
||||
|
||||
ENV OPCACHE_REVALIDATE_FREQ=0 \
|
||||
OPCACHE_VALIDATE_TIMESTAMPS=0 \
|
||||
|
||||
+12
-10
@@ -1,14 +1,17 @@
|
||||
ARG clear_ver
|
||||
FROM ghcr.io/clearlinux/os-core:$clear_ver AS core
|
||||
FROM clearlinux:latest AS builder
|
||||
|
||||
ARG clear_ver
|
||||
ARG swupd_args
|
||||
# Move to latest Clear Linux release to ensure
|
||||
# that the swupd command line arguments are
|
||||
# correct
|
||||
RUN swupd update --no-boot-update $swupd_args
|
||||
RUN swupd update --no-boot-update -V $clear_ver $swupd_args
|
||||
|
||||
# Grab os-release info from the minimal base image so
|
||||
# that the new content matches the exact OS version
|
||||
COPY --from=clearlinux/os-core:latest /usr/lib/os-release /
|
||||
COPY --from=core /usr/lib/os-release /
|
||||
|
||||
# Install additional content in a target directory
|
||||
# using the os version from the minimal base
|
||||
@@ -16,25 +19,25 @@ RUN source /os-release && \
|
||||
mkdir /install_root \
|
||||
&& swupd os-install -V ${VERSION_ID} \
|
||||
--path /install_root --statedir /swupd-state \
|
||||
--bundles=postgresql11,su-exec --no-boot-update
|
||||
--bundles=postgresql,su-exec --no-boot-update
|
||||
|
||||
# For some Host OS configuration with redirect_dir on,
|
||||
# extra data are saved on the upper layer when the same
|
||||
# file exists on different layers. To minimize docker
|
||||
# image size, remove the overlapped files before copy.
|
||||
RUN mkdir /os_core_install
|
||||
COPY --from=clearlinux/os-core:latest / /os_core_install/
|
||||
COPY --from=core / /os_core_install/
|
||||
RUN cd / && \
|
||||
find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true
|
||||
|
||||
FROM clearlinux/os-core:latest
|
||||
FROM core
|
||||
|
||||
COPY --from=builder /install_root /
|
||||
|
||||
ENV PATH $PATH:/usr/libexec/postgresql11
|
||||
ENV PATH $PATH:/usr/libexec/postgresql
|
||||
ENV PGDATA /var/lib/pgsql/data
|
||||
RUN sed -i "s|#listen_addresses.*|listen_addresses = '*'|" /usr/share/postgresql11/postgresql.conf.sample && \
|
||||
mkdir -p /run/postgresql11 && chown -R postgres:postgres /run/postgresql11 && \
|
||||
RUN sed -i "s|#listen_addresses.*|listen_addresses = '*'|" /usr/share/postgresql/postgresql.conf.sample && \
|
||||
mkdir -p /run/postgresql && chown -R postgres:postgres /run/postgresql && \
|
||||
mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && \
|
||||
mkdir /docker-entrypoint-initdb.d && \
|
||||
mkdir -p /usr/local/bin
|
||||
@@ -42,8 +45,7 @@ RUN sed -i "s|#listen_addresses.*|listen_addresses = '*'|" /usr/share/postgresql
|
||||
VOLUME /var/lib/pgsql/data
|
||||
COPY docker-entrypoint.sh /usr/local/bin/
|
||||
RUN chmod +x /usr/local/bin/docker-entrypoint.sh && \
|
||||
ln -s /usr/local/bin/docker-entrypoint.sh / && \
|
||||
ln -s /usr/share/postgresql11 /usr/share/postgresql
|
||||
ln -s /usr/local/bin/docker-entrypoint.sh /
|
||||
|
||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||
|
||||
|
||||
@@ -34,9 +34,9 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
|
||||
chown -R postgres "$PGDATA"
|
||||
chmod 700 "$PGDATA"
|
||||
|
||||
mkdir -p /var/run/postgresql11
|
||||
chown -R postgres /var/run/postgresql11
|
||||
chmod 775 /var/run/postgresql11
|
||||
mkdir -p /var/run/postgresql
|
||||
chown -R postgres /var/run/postgresql
|
||||
chmod 775 /var/run/postgresql
|
||||
|
||||
# Create the transaction log directory before initdb is run (below) so the directory is owned by the correct user
|
||||
if [ "$POSTGRES_INITDB_WALDIR" ]; then
|
||||
|
||||
+7
-4
@@ -1,14 +1,17 @@
|
||||
ARG clear_ver
|
||||
FROM ghcr.io/clearlinux/os-core:$clear_ver AS core
|
||||
FROM clearlinux:latest AS builder
|
||||
|
||||
ARG clear_ver
|
||||
ARG swupd_args
|
||||
# Move to latest Clear Linux release to ensure
|
||||
# that the swupd command line arguments are
|
||||
# correct
|
||||
RUN swupd update --no-boot-update $swupd_args
|
||||
RUN swupd update --no-boot-update -V $clear_ver $swupd_args
|
||||
|
||||
# Grab os-release info from the minimal base image so
|
||||
# that the new content matches the exact OS version
|
||||
COPY --from=clearlinux/os-core:latest /usr/lib/os-release /
|
||||
COPY --from=core /usr/lib/os-release /
|
||||
|
||||
# Install additional content in a target directory
|
||||
# using the os version from the minimal base
|
||||
@@ -23,12 +26,12 @@ RUN source /os-release && \
|
||||
# file exists on different layers. To minimize docker
|
||||
# image size, remove the overlapped files before copy.
|
||||
RUN mkdir /os_core_install
|
||||
COPY --from=clearlinux/os-core:latest / /os_core_install/
|
||||
COPY --from=core / /os_core_install/
|
||||
RUN cd / && \
|
||||
find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true
|
||||
|
||||
|
||||
FROM clearlinux/os-core:latest
|
||||
FROM core
|
||||
|
||||
ENV NAME="clearlinux-python"
|
||||
COPY --from=builder /install_root /
|
||||
|
||||
+7
-5
@@ -1,15 +1,17 @@
|
||||
ARG clear_ver
|
||||
FROM ghcr.io/clearlinux/os-core:$clear_ver AS core
|
||||
FROM clearlinux:latest AS builder
|
||||
|
||||
|
||||
ARG clear_ver
|
||||
ARG swupd_args
|
||||
# Move to latest Clear Linux release to ensure
|
||||
# that the swupd command line arguments are
|
||||
# correct
|
||||
RUN swupd update --no-boot-update $swupd_args
|
||||
RUN swupd update --no-boot-update -V $clear_ver $swupd_args
|
||||
|
||||
# Grab os-release info from the minimal base image so
|
||||
# that the new content matches the exact OS version
|
||||
COPY --from=clearlinux/os-core:latest /usr/lib/os-release /
|
||||
COPY --from=core /usr/lib/os-release /
|
||||
|
||||
# Install additional content in a target directory
|
||||
# using the os version from the minimal base
|
||||
@@ -24,12 +26,12 @@ RUN source /os-release && \
|
||||
# file exists on different layers. To minimize docker
|
||||
# image size, remove the overlapped files before copy.
|
||||
RUN mkdir /os_core_install
|
||||
COPY --from=clearlinux/os-core:latest / /os_core_install/
|
||||
COPY --from=core / /os_core_install/
|
||||
RUN cd / && \
|
||||
find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true
|
||||
|
||||
|
||||
FROM clearlinux/os-core:latest
|
||||
FROM core
|
||||
|
||||
COPY --from=builder /install_root /
|
||||
|
||||
|
||||
+7
-4
@@ -1,14 +1,17 @@
|
||||
ARG clear_ver
|
||||
FROM ghcr.io/clearlinux/os-core:$clear_ver AS core
|
||||
FROM clearlinux:latest AS builder
|
||||
|
||||
ARG clear_ver
|
||||
ARG swupd_args
|
||||
# Move to latest Clear Linux release to ensure
|
||||
# that the swupd command line arguments are
|
||||
# correct
|
||||
RUN swupd update --no-boot-update $swupd_args
|
||||
RUN swupd update --no-boot-update -V $clear_ver $swupd_args
|
||||
|
||||
# Grab os-release info from the minimal base image so
|
||||
# that the new content matches the exact OS version
|
||||
COPY --from=clearlinux/os-core:latest /usr/lib/os-release /
|
||||
COPY --from=core /usr/lib/os-release /
|
||||
|
||||
# Install additional content in a target directory
|
||||
# using the os version from the minimal base
|
||||
@@ -23,11 +26,11 @@ RUN source /os-release && \
|
||||
# file exists on different layers. To minimize docker
|
||||
# image size, remove the overlapped files before copy.
|
||||
RUN mkdir /os_core_install
|
||||
COPY --from=clearlinux/os-core:latest / /os_core_install/
|
||||
COPY --from=core / /os_core_install/
|
||||
RUN cd / && \
|
||||
find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true
|
||||
|
||||
FROM clearlinux/os-core:latest
|
||||
FROM core
|
||||
|
||||
COPY --from=builder /install_root /
|
||||
|
||||
|
||||
+7
-4
@@ -1,14 +1,17 @@
|
||||
ARG clear_ver
|
||||
FROM ghcr.io/clearlinux/os-core:$clear_ver AS core
|
||||
FROM clearlinux:latest AS builder
|
||||
|
||||
ARG clear_ver
|
||||
ARG swupd_args
|
||||
# Move to latest Clear Linux release to ensure
|
||||
# that the swupd command line arguments are
|
||||
# correct
|
||||
RUN swupd update --no-boot-update $swupd_args
|
||||
RUN swupd update --no-boot-update -V $clear_ver $swupd_args
|
||||
|
||||
# Grab os-release info from the minimal base image so
|
||||
# that the new content matches the exact OS version
|
||||
COPY --from=clearlinux/os-core:latest /usr/lib/os-release /
|
||||
COPY --from=core /usr/lib/os-release /
|
||||
|
||||
# Install additional content in a target directory
|
||||
# using the os version from the minimal base
|
||||
@@ -23,11 +26,11 @@ RUN source /os-release && \
|
||||
# file exists on different layers. To minimize docker
|
||||
# image size, remove the overlapped files before copy.
|
||||
RUN mkdir /os_core_install
|
||||
COPY --from=clearlinux/os-core:latest / /os_core_install/
|
||||
COPY --from=core / /os_core_install/
|
||||
RUN cd / && \
|
||||
find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true
|
||||
|
||||
FROM clearlinux/os-core:latest
|
||||
FROM core
|
||||
|
||||
COPY --from=builder /install_root /
|
||||
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
ARG clear_ver
|
||||
FROM ghcr.io/clearlinux/os-core:$clear_ver AS core
|
||||
FROM clearlinux:latest AS builder
|
||||
|
||||
ARG clear_ver
|
||||
ARG swupd_args
|
||||
# Move to latest Clear Linux release to ensure
|
||||
# that the swupd command line arguments are
|
||||
# correct
|
||||
RUN swupd update --no-boot-update $swupd_args
|
||||
RUN swupd update --no-boot-update -V $clear_ver $swupd_args
|
||||
|
||||
# Grab os-release info from the minimal base image so
|
||||
# that the new content matches the exact OS version
|
||||
COPY --from=clearlinux/os-core:latest /usr/lib/os-release /
|
||||
COPY --from=core /usr/lib/os-release /
|
||||
|
||||
# Install additional content in a target directory
|
||||
# using the os version from the minimal base
|
||||
@@ -23,12 +26,12 @@ RUN source /os-release && \
|
||||
# file exists on different layers. To minimize docker
|
||||
# image size, remove the overlapped files before copy.
|
||||
RUN mkdir /os_core_install
|
||||
COPY --from=clearlinux/os-core:latest / /os_core_install/
|
||||
COPY --from=core / /os_core_install/
|
||||
RUN cd / && \
|
||||
find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true
|
||||
|
||||
|
||||
FROM clearlinux/os-core:latest
|
||||
FROM core
|
||||
|
||||
COPY --from=builder /install_root /
|
||||
|
||||
|
||||
@@ -34,21 +34,21 @@ The test cases are for the Containers already added in the Actions CI.
|
||||
So for any Containers name defined in the matrix.node of .github/workflows/
|
||||
tests.yml, the same name directory could be added in the directory "tests".
|
||||
And the same name BAT script in the new added directory will be executed for
|
||||
each PR/commits. For example, redis.
|
||||
* First, the redis name is added in the matrix.node.
|
||||
each PR/commits. For example, valkey.
|
||||
* First, the valkey name is added in the matrix.node.
|
||||
```
|
||||
matrix:
|
||||
node: ["redis"]
|
||||
node: ["valkey"]
|
||||
```
|
||||
|
||||
* Second, create the "redis" directory and BAT script under tests
|
||||
* Second, create the "valkey" directory and BAT script under tests
|
||||
```
|
||||
dockerfiles
|
||||
└── tests
|
||||
└── redis
|
||||
└── redis.bats
|
||||
└── redis-security.bats
|
||||
└── valkey
|
||||
└── valkey.bats
|
||||
└── valkey-security.bats
|
||||
```
|
||||
|
||||
* Last, develop the redis BAT test cases in "redis.bats" and "redis-security.bats" following the above
|
||||
* Last, develop the valkey BAT test cases in "valkey.bats" and "valkey-security.bats" following the above
|
||||
principles.
|
||||
|
||||
+1
-1
@@ -7,6 +7,6 @@ The dockerfiles are from [page](https://github.com/clearlinux/dockerfiles). The
|
||||
|
||||
To run the tests, you can simple type "make tests", it will run all the test cases.
|
||||
If you want to run specific Container test, just type "make SERVICE-NAME".
|
||||
For example, "make redis" to run tests for redis.
|
||||
For example, "make valkey" to run tests for valkey.
|
||||
|
||||
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
#!/usr/bin/env bats
|
||||
# Copyright (C) 2018 Intel Corporation
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
load ../utils
|
||||
load ../security
|
||||
|
||||
@test "1191 test" {
|
||||
# start container first
|
||||
docker run --name redis-server --detach clearlinux/redis
|
||||
run check_container_status redis-server
|
||||
[ "$status" -eq 0 ]
|
||||
run Test_1191 clearlinux/redis
|
||||
[ "$output" == "pass" ]
|
||||
|
||||
# stop the container
|
||||
docker rm -f redis-server
|
||||
sleep 3
|
||||
run check_container_status redis-server
|
||||
[ "$status" -eq 1 ]
|
||||
}
|
||||
|
||||
@test "1195 test" {
|
||||
# start container first
|
||||
docker run --name redis-server --detach clearlinux/redis
|
||||
run check_container_status redis-server
|
||||
[ "$status" -eq 0 ]
|
||||
run Test_1195 clearlinux/redis
|
||||
[ "$output" == "pass" ]
|
||||
|
||||
# stop the container
|
||||
docker rm -f redis-server
|
||||
sleep 3
|
||||
run check_container_status redis-server
|
||||
[ "$status" -eq 1 ]
|
||||
}
|
||||
|
||||
@test "1215 test" {
|
||||
# start container first
|
||||
docker run --name redis-server --detach --security-opt=no-new-privileges clearlinux/redis
|
||||
run check_container_status redis-server
|
||||
[ "$status" -eq 0 ]
|
||||
run Test_1215 clearlinux/redis
|
||||
[ "$output" == "pass" ]
|
||||
|
||||
# stop the container
|
||||
docker rm -f redis-server
|
||||
sleep 3
|
||||
run check_container_status redis-server
|
||||
[ "$status" -eq 1 ]
|
||||
}
|
||||
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
#!/usr/bin/env bats
|
||||
# Copyright (C) 2018 Intel Corporation
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
load ../utils
|
||||
|
||||
@test "Redis LPUSH test" {
|
||||
# start tje container first
|
||||
docker run --name redis-server --rm -d clearlinux/redis redis-server --protected-mode no
|
||||
sleep 5
|
||||
run check_container_status redis-server
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
# get ip address
|
||||
run get_container_ip redis-server
|
||||
[ "$status" -eq 0 ]
|
||||
ipaddr="$output"
|
||||
|
||||
# push two integers
|
||||
docker run --rm clearlinux/redis redis-cli -h $ipaddr lpush mylist x
|
||||
docker run --rm clearlinux/redis redis-cli -h $ipaddr lpush mylist y
|
||||
|
||||
# stop the container
|
||||
docker stop redis-server
|
||||
sleep 3
|
||||
run check_container_status redis-server
|
||||
[ "$status" -eq 1 ]
|
||||
}
|
||||
|
||||
@test "Redis LRANGE test" {
|
||||
# start tje container first
|
||||
docker run --name redis-server --rm -d clearlinux/redis redis-server --protected-mode no
|
||||
sleep 5
|
||||
run check_container_status redis-server
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
# get ip address
|
||||
run get_container_ip redis-server
|
||||
[ "$status" -eq 0 ]
|
||||
ipaddr="$output"
|
||||
|
||||
# push two integers
|
||||
docker run --rm clearlinux/redis redis-cli -h $ipaddr lrange mylist 0 -1
|
||||
|
||||
# stop the container
|
||||
docker stop redis-server
|
||||
sleep 3
|
||||
run check_container_status redis-server
|
||||
[ "$status" -eq 1 ]
|
||||
}
|
||||
|
||||
Executable
+53
@@ -0,0 +1,53 @@
|
||||
#!/usr/bin/env bats
|
||||
# Copyright (C) 2018 Intel Corporation
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
load ../utils
|
||||
load ../security
|
||||
|
||||
@test "1191 test" {
|
||||
# start container first
|
||||
docker run --name valkey-server --detach ghcr.io/clearlinux/valkey
|
||||
run check_container_status valkey-server
|
||||
[ "$status" -eq 0 ]
|
||||
run Test_1191 ghcr.io/clearlinux/valkey
|
||||
[ "$output" == "pass" ]
|
||||
|
||||
# stop the container
|
||||
docker rm -f valkey-server
|
||||
sleep 3
|
||||
run check_container_status valkey-server
|
||||
[ "$status" -eq 1 ]
|
||||
}
|
||||
|
||||
@test "1195 test" {
|
||||
# start container first
|
||||
docker run --name valkey-server --detach ghcr.io/clearlinux/valkey
|
||||
run check_container_status valkey-server
|
||||
[ "$status" -eq 0 ]
|
||||
run Test_1195 ghcr.io/clearlinux/valkey
|
||||
[ "$output" == "pass" ]
|
||||
|
||||
# stop the container
|
||||
docker rm -f valkey-server
|
||||
sleep 3
|
||||
run check_container_status valkey-server
|
||||
[ "$status" -eq 1 ]
|
||||
}
|
||||
|
||||
@test "1215 test" {
|
||||
# start container first
|
||||
docker run --name valkey-server --detach --security-opt=no-new-privileges ghcr.io/clearlinux/valkey
|
||||
run check_container_status valkey-server
|
||||
[ "$status" -eq 0 ]
|
||||
run Test_1215 ghcr.io/clearlinux/valkey
|
||||
[ "$output" == "pass" ]
|
||||
|
||||
# stop the container
|
||||
docker rm -f valkey-server
|
||||
sleep 3
|
||||
run check_container_status valkey-server
|
||||
[ "$status" -eq 1 ]
|
||||
}
|
||||
|
||||
|
||||
Executable
+51
@@ -0,0 +1,51 @@
|
||||
#!/usr/bin/env bats
|
||||
# Copyright (C) 2018 Intel Corporation
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
load ../utils
|
||||
|
||||
@test "valkey LPUSH test" {
|
||||
# start the container first
|
||||
docker run --name valkey-server --rm -d ghcr.io/clearlinux/valkey valkey-server --protected-mode no
|
||||
sleep 5
|
||||
run check_container_status valkey-server
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
# get ip address
|
||||
run get_container_ip valkey-server
|
||||
[ "$status" -eq 0 ]
|
||||
ipaddr="$output"
|
||||
|
||||
# push two integers
|
||||
docker run --rm ghcr.io/clearlinux/valkey redis-cli -h $ipaddr lpush mylist x
|
||||
docker run --rm ghcr.io/clearlinux/valkey redis-cli -h $ipaddr lpush mylist y
|
||||
|
||||
# stop the container
|
||||
docker stop valkey-server
|
||||
sleep 3
|
||||
run check_container_status valkey-server
|
||||
[ "$status" -eq 1 ]
|
||||
}
|
||||
|
||||
@test "valkey LRANGE test" {
|
||||
# start tje container first
|
||||
docker run --name valkey-server --rm -d ghcr.io/clearlinux/valkey valkey-server --protected-mode no
|
||||
sleep 5
|
||||
run check_container_status valkey-server
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
# get ip address
|
||||
run get_container_ip valkey-server
|
||||
[ "$status" -eq 0 ]
|
||||
ipaddr="$output"
|
||||
|
||||
# push two integers
|
||||
docker run --rm ghcr.io/clearlinux/valkey redis-cli -h $ipaddr lrange mylist 0 -1
|
||||
|
||||
# stop the container
|
||||
docker stop valkey-server
|
||||
sleep 3
|
||||
run check_container_status valkey-server
|
||||
[ "$status" -eq 1 ]
|
||||
}
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
ARG clear_ver
|
||||
FROM ghcr.io/clearlinux/os-core:$clear_ver AS core
|
||||
FROM clearlinux:latest AS builder
|
||||
|
||||
ARG clear_ver
|
||||
ARG swupd_args
|
||||
# Move to latest Clear Linux release to ensure
|
||||
# that the swupd command line arguments are
|
||||
# correct
|
||||
RUN swupd update --no-boot-update $swupd_args
|
||||
RUN swupd update --no-boot-update -V $clear_ver $swupd_args
|
||||
|
||||
# Grab os-release info from the minimal base image so
|
||||
# that the new content matches the exact OS version
|
||||
COPY --from=clearlinux/os-core:latest /usr/lib/os-release /
|
||||
COPY --from=core /usr/lib/os-release /
|
||||
|
||||
# Install additional content in a target directory
|
||||
# using the os version from the minimal base
|
||||
@@ -16,18 +19,18 @@ RUN source /os-release && \
|
||||
mkdir /install_root \
|
||||
&& swupd os-install -V ${VERSION_ID} \
|
||||
--path /install_root --statedir /swupd-state \
|
||||
--bundles=redis-native,findutils,su-exec --no-boot-update
|
||||
--bundles=valkey,findutils,su-exec --no-boot-update
|
||||
|
||||
# For some Host OS configuration with redirect_dir on,
|
||||
# extra data are saved on the upper layer when the same
|
||||
# file exists on different layers. To minimize docker
|
||||
# image size, remove the overlapped files before copy.
|
||||
RUN mkdir /os_core_install
|
||||
COPY --from=clearlinux/os-core:latest / /os_core_install/
|
||||
COPY --from=core / /os_core_install/
|
||||
RUN cd / && \
|
||||
find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true
|
||||
|
||||
FROM clearlinux/os-core:latest
|
||||
FROM core
|
||||
|
||||
COPY --from=builder /install_root /
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
# Clear Linux* OS `redis` container image
|
||||
# Clear Linux* OS `valkey` container image
|
||||
|
||||
<!-- Required -->
|
||||
## What is this image?
|
||||
|
||||
`clearlinux/redis` is a Docker image with `redis` running on top of the
|
||||
`clearlinux/valkey` is a Docker image with `valkey` running on top of the
|
||||
[official clearlinux base image](https://hub.docker.com/_/clearlinux).
|
||||
|
||||
<!-- application introduction -->
|
||||
> [Redis](https://redis.io/) is an open source (BSD licensed), in-memory data structure
|
||||
> [Valkey](https://valkey.io/) is an open source (BSD licensed), in-memory data structure
|
||||
> store, used as a database, cache and message broker. It supports data structures such
|
||||
> as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs,
|
||||
> geospatial indexes with radius queries and streams.
|
||||
@@ -40,23 +40,20 @@ To learn more about Clear Linux* OS, visit: https://clearlinux.org.
|
||||
The easiest way to get started with this image is by simply pulling it from
|
||||
Docker Hub.
|
||||
|
||||
*Note: This container uses the same syntax as the [official redis
|
||||
image](https://hub.docker.com/_/redis).
|
||||
|
||||
|
||||
1. Pull the image from Docker Hub:
|
||||
1. Pull the image from Github Container Registry:
|
||||
```
|
||||
docker pull clearlinux/redis
|
||||
docker pull ghcr.io/clearlinux/valkey
|
||||
```
|
||||
|
||||
2. Start a container using the examples below:
|
||||
```
|
||||
docker run --name some-redis --network some-network -d clearlinux/redis redis-server --protected-mode no
|
||||
docker run --name some-valkey --network some-network -d ghcr.io/clearlinux/valkey valkey-server --protected-mode no
|
||||
```
|
||||
|
||||
|
||||
3. connecting via redis-cli
|
||||
```
|
||||
docker run -it --network some-network --rm clearlinux/redis redis-cli -h some-redis
|
||||
docker run -it --network some-network --rm ghcr.io/clearlinux/valkey redis-cli -h some-valkey
|
||||
```
|
||||
|
||||
<!-- Optional -->
|
||||
@@ -71,22 +68,22 @@ This image can also be deployed on a Kubernetes cluster, such as [minikube](http
|
||||
|
||||
Steps to deploy redis on a Kubernetes cluster:
|
||||
|
||||
1. If you want to deploy `redis-deployment.yaml`
|
||||
1. If you want to deploy `valkey-deployment.yaml`
|
||||
|
||||
```
|
||||
kubectl create -f redis-deployment.yaml
|
||||
kubectl create -f valkey-deployment.yaml
|
||||
```
|
||||
|
||||
Or if you want to deploy `redis-deployment-conf.yaml`
|
||||
Or if you want to deploy `valkey-deployment-conf.yaml`
|
||||
|
||||
```
|
||||
kubectl create -f redis-deployment-conf.yaml
|
||||
kubectl create -f valkey-deployment-conf.yaml
|
||||
```
|
||||
|
||||
2. Install redis bundle and connect to the service, where 30001 is the port number defined in your service.
|
||||
2. Install valkey bundle and connect to the service, where 30001 is the port number defined in your service.
|
||||
|
||||
```
|
||||
swupd bundle-add redis-native
|
||||
swupd bundle-add valkey
|
||||
redis-cli -h <nodeIP> -p 30001
|
||||
```
|
||||
|
||||
@@ -104,17 +101,17 @@ modify the container images.
|
||||
|
||||
2. Change to the directory of the application:
|
||||
```
|
||||
cd redis/
|
||||
cd valkey/
|
||||
```
|
||||
|
||||
3. Build the container image:
|
||||
```
|
||||
docker build -t clearlinux/redis .
|
||||
docker build -t ghcr.io/clearlinux/valkey .
|
||||
```
|
||||
|
||||
Refer to the Docker documentation for [default build arguments](https://docs.docker.com/engine/reference/builder/#arg).
|
||||
Additionally:
|
||||
|
||||
|
||||
- `swupd_args` - specifies arguments to pass to the Clear Linux* OS software
|
||||
manager. See the [swupd man pages](https://github.com/clearlinux/swupd-client/blob/master/docs/swupd.1.rst#options)
|
||||
for more information.
|
||||
@@ -4,11 +4,11 @@ set -e
|
||||
# first arg is `-f` or `--some-option`
|
||||
# or first arg is `something.conf`
|
||||
if [ "${1#-}" != "$1" ] || [ "${1%.conf}" != "$1" ]; then
|
||||
set -- redis-server "$@"
|
||||
set -- valkey-server "$@"
|
||||
fi
|
||||
|
||||
# change to redis user to run
|
||||
if [ "$1" = 'redis-server' -a "$(id -u)" = '0' ]; then
|
||||
if [ "$1" = 'valkey-server' -a "$(id -u)" = '0' ]; then
|
||||
exec su-exec redis "$BASH_SOURCE" "$@"
|
||||
fi
|
||||
|
||||
@@ -11,23 +11,23 @@ data:
|
||||
apiVersion: apps/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: redis-deployment
|
||||
name: valkey-deployment
|
||||
spec:
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
name: redis-deployment
|
||||
name: valkey-deployment
|
||||
labels:
|
||||
app: redis
|
||||
app: valkey
|
||||
spec:
|
||||
volumes:
|
||||
- name: config-volume
|
||||
configMap:
|
||||
name: redis-config
|
||||
name: valkey-config
|
||||
containers:
|
||||
- image: docker.io/clearlinux/redis
|
||||
name: redis
|
||||
command: ["redis-server"]
|
||||
- image: ghcr.io/clearlinux/valkey
|
||||
name: valkey
|
||||
command: ["valkey-server"]
|
||||
args: ["/etc/redis.conf","--protected-mode no"]
|
||||
volumeMounts:
|
||||
- name: config-volume
|
||||
@@ -38,7 +38,7 @@ spec:
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: redis-svc
|
||||
name: valkey-svc
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
@@ -46,4 +46,4 @@ spec:
|
||||
targetPort: 6379
|
||||
nodePort: 30001
|
||||
selector:
|
||||
app: redis
|
||||
app: valkey
|
||||
@@ -1,24 +1,24 @@
|
||||
apiVersion: apps/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: redis-deployment
|
||||
name: valkey-deployment
|
||||
spec:
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
name: redis-deployment
|
||||
name: valkey-deployment
|
||||
labels:
|
||||
app: redis
|
||||
app: valkey
|
||||
spec:
|
||||
containers:
|
||||
- image: docker.io/clearlinux/redis
|
||||
name: redis
|
||||
- image: ghcr.io/clearlinux/valkey
|
||||
name: valkey
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: redis-svc
|
||||
name: valkey-svc
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
@@ -26,5 +26,5 @@ spec:
|
||||
targetPort: 6379
|
||||
nodePort: 30001
|
||||
selector:
|
||||
app: redis
|
||||
app: valkey
|
||||
|
||||
Reference in New Issue
Block a user