Compare commits
20 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
a88b52f302 | ||
|
8f4f43209d | ||
|
3bfd480cd6 | ||
|
24b979658c | ||
|
83245bcf5f | ||
|
9aa7f4d4e4 | ||
|
fbc33ffd62 | ||
|
aabfbaa41a | ||
|
f87bb65981 | ||
|
ca2d9fb104 | ||
|
6053097470 | ||
|
a165c1c5b4 | ||
|
5f8b5ee790 | ||
|
a2d2fbc193 | ||
|
712d64e484 | ||
|
1c78ef6e04 | ||
|
78cede6065 | ||
|
afa5804ed0 | ||
|
e8ee749190 | ||
|
94edc7d7f3 |
115
.github/workflows/cron.update.yml
vendored
Normal file
115
.github/workflows/cron.update.yml
vendored
Normal file
@@ -0,0 +1,115 @@
|
||||
name: cron-update
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 5 * * *"
|
||||
|
||||
jobs:
|
||||
cron-update:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
actions: read
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: init / checkout
|
||||
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
|
||||
with:
|
||||
ref: 'master'
|
||||
fetch-depth: 0
|
||||
|
||||
- name: cron-update / get latest version
|
||||
run: |
|
||||
echo "LATEST_VERSION=$(curl -sSL https://nginx.org/en/download.html | grep -oE '<a href="/download/nginx-[0-9]+.[0-9]+.[0-9]+.tar.gz">nginx-[0-9]+.[0-9]+.[0-9]+</a>' | head -n 2 | tail -n 1 | grep -oE 'nginx-[0-9]+.[0-9]+.[0-9]+' | head -n 2 | tail -n 1 | sed 's/nginx-//')" >> "${GITHUB_ENV}"
|
||||
echo "LATEST_TAG=$(git describe --abbrev=0 --tags `git rev-list --tags --max-count=1` | sed 's/v//')" >> "${GITHUB_ENV}"
|
||||
|
||||
- name: cron-update / setup node
|
||||
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
|
||||
with:
|
||||
node-version: '20'
|
||||
- run: npm i semver
|
||||
|
||||
- name: cron-update / compare latest with current version
|
||||
uses: actions/github-script@62c3794a3eb6788d9a2a72b219504732c0c9a298
|
||||
with:
|
||||
script: |
|
||||
const { existsSync, readFileSync, writeFileSync } = require('node:fs');
|
||||
const { resolve } = require('node:path');
|
||||
const { inspect } = require('node:util');
|
||||
const semver = require('semver')
|
||||
const repository = {dot:{}};
|
||||
|
||||
try{
|
||||
const path = resolve('.json');
|
||||
if(existsSync(path)){
|
||||
try{
|
||||
repository.dot = JSON.parse(readFileSync(path).toString());
|
||||
}catch(e){
|
||||
throw new Error('could not parse .json');
|
||||
}
|
||||
}else{
|
||||
throw new Error('.json does not exist');
|
||||
}
|
||||
}catch(e){
|
||||
core.setFailed(e);
|
||||
}
|
||||
|
||||
const latest = semver.valid(semver.coerce('${{ env.LATEST_VERSION }}'));
|
||||
const current = semver.valid(semver.coerce(repository.dot.semver.version));
|
||||
const tag = semver.valid(semver.coerce('${{ env.LATEST_TAG }}'));
|
||||
|
||||
if(latest && latest !== current){
|
||||
core.info(`new ${semver.diff(current, latest)} release found (${latest})!`)
|
||||
repository.dot.semver.version = latest;
|
||||
if(tag){
|
||||
core.exportVariable('WORKFLOW_NEW_TAG', semver.inc(tag, semver.diff(current, latest)));
|
||||
}
|
||||
|
||||
if(repository.dot.semver?.latest){
|
||||
repository.dot.semver.latest = repository.dot.semver.version;
|
||||
}
|
||||
|
||||
if(repository.dot?.readme?.comparison?.image){
|
||||
repository.dot.readme.comparison.image = repository.dot.readme.comparison.image.replace(current, repository.dot.semver.version);
|
||||
}
|
||||
|
||||
try{
|
||||
writeFileSync(resolve('.json'), JSON.stringify(repository.dot, null, 2));
|
||||
core.exportVariable('WORKFLOW_AUTO_UPDATE', true);
|
||||
}catch(e){
|
||||
core.setFailed(e);
|
||||
}
|
||||
}else{
|
||||
core.info('no new release found');
|
||||
}
|
||||
|
||||
core.info(inspect(repository.dot, {showHidden:false, depth:null, colors:true}));
|
||||
|
||||
- name: cron-update / checkout
|
||||
id: checkout
|
||||
if: env.WORKFLOW_AUTO_UPDATE == 'true'
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git add .json
|
||||
git commit -m "chore: auto upgrade to ${{ env.LATEST_VERSION }}"
|
||||
git push origin HEAD:master
|
||||
|
||||
- name: cron-update / tag
|
||||
if: env.WORKFLOW_AUTO_UPDATE == 'true' && steps.checkout.outcome == 'success'
|
||||
run: |
|
||||
SHA256=$(git rev-list --branches --max-count=1)
|
||||
git tag -a v${{ env.WORKFLOW_NEW_TAG }} -m "v${{ env.WORKFLOW_NEW_TAG }}" ${SHA256}
|
||||
git push --follow-tags
|
||||
|
||||
- name: cron-update / build docker image
|
||||
if: env.WORKFLOW_AUTO_UPDATE == 'true' && steps.checkout.outcome == 'success'
|
||||
uses: the-actions-org/workflow-dispatch@3133c5d135c7dbe4be4f9793872b6ef331b53bc7
|
||||
with:
|
||||
workflow: docker.yml
|
||||
wait-for-completion: false
|
||||
token: "${{ secrets.REPOSITORY_TOKEN }}"
|
||||
inputs: '{ "release":"true", "readme":"true" }'
|
||||
ref: "v${{ env.WORKFLOW_NEW_TAG }}"
|
70
.github/workflows/cve.yml
vendored
Normal file
70
.github/workflows/cve.yml
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
name: cve
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "30 15 */2 * *"
|
||||
|
||||
jobs:
|
||||
cve:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: init / checkout
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||
with:
|
||||
ref: ${{ github.ref_name }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: init / setup environment
|
||||
uses: actions/github-script@62c3794a3eb6788d9a2a72b219504732c0c9a298
|
||||
with:
|
||||
script: |
|
||||
const { existsSync, readFileSync } = require('node:fs');
|
||||
const { resolve } = require('node:path');
|
||||
const { inspect } = require('node:util');
|
||||
const { Buffer } = require('node:buffer');
|
||||
const inputs = `${{ toJSON(github.event.inputs) }}`;
|
||||
const opt = {input:{}, dot:{}};
|
||||
|
||||
try{
|
||||
if(inputs.length > 0){
|
||||
opt.input = JSON.parse(inputs);
|
||||
if(opt.input?.etc){
|
||||
opt.input.etc = JSON.parse(Buffer.from(opt.input.etc, 'base64').toString('ascii'));
|
||||
}
|
||||
}
|
||||
}catch(e){
|
||||
core.warning('could not parse github.event.inputs');
|
||||
}
|
||||
|
||||
try{
|
||||
const path = resolve('.json');
|
||||
if(existsSync(path)){
|
||||
try{
|
||||
opt.dot = JSON.parse(readFileSync(path).toString());
|
||||
}catch(e){
|
||||
throw new Error('could not parse .json');
|
||||
}
|
||||
}else{
|
||||
throw new Error('.json does not exist');
|
||||
}
|
||||
}catch(e){
|
||||
core.setFailed(e);
|
||||
}
|
||||
|
||||
core.info(inspect(opt, {showHidden:false, depth:null, colors:true}));
|
||||
|
||||
core.exportVariable('WORKFLOW_IMAGE', `${opt.dot.image}:${(opt.dot?.semver?.version === undefined) ? 'rolling' : opt.dot.semver.version}`);
|
||||
core.exportVariable('WORKFLOW_GRYPE_SEVERITY_CUTOFF', (opt.dot?.grype?.severity || 'high'));
|
||||
|
||||
|
||||
- name: grype / scan
|
||||
id: grype
|
||||
uses: anchore/scan-action@dc6246fcaf83ae86fcc6010b9824c30d7320729e
|
||||
with:
|
||||
image: ${{ env.WORKFLOW_IMAGE }}
|
||||
fail-build: true
|
||||
severity-cutoff: ${{ env.WORKFLOW_GRYPE_SEVERITY_CUTOFF }}
|
||||
output-format: 'sarif'
|
||||
by-cve: true
|
||||
cache-db: true
|
101
.github/workflows/docker.yml
vendored
101
.github/workflows/docker.yml
vendored
@@ -16,6 +16,12 @@ on:
|
||||
required: false
|
||||
default: 'ubuntu-22.04'
|
||||
|
||||
|
||||
build:
|
||||
description: 'set WORKFLOW_BUILD'
|
||||
required: false
|
||||
default: 'true'
|
||||
|
||||
release:
|
||||
description: 'set WORKFLOW_GITHUB_RELEASE'
|
||||
required: false
|
||||
@@ -45,7 +51,6 @@ jobs:
|
||||
actions: read
|
||||
contents: write
|
||||
packages: write
|
||||
security-events: write
|
||||
|
||||
steps:
|
||||
- name: init / checkout
|
||||
@@ -96,7 +101,7 @@ jobs:
|
||||
const docker = {
|
||||
image:{
|
||||
name:opt.dot.image,
|
||||
arch:(opt.dot.arch || 'linux/amd64,linux/arm64'),
|
||||
arch:(opt.input?.etc?.arch || opt.dot?.arch || 'linux/amd64,linux/arm64'),
|
||||
prefix:((opt.input?.etc?.semverprefix) ? `${opt.input?.etc?.semverprefix}-` : ''),
|
||||
suffix:((opt.input?.etc?.semversuffix) ? `-${opt.input?.etc?.semversuffix}` : ''),
|
||||
description:(opt.dot?.readme?.description || ''),
|
||||
@@ -105,7 +110,7 @@ jobs:
|
||||
app:{
|
||||
image:opt.dot.image,
|
||||
name:opt.dot.name,
|
||||
version:(opt.input?.etc?.version || opt.dot.semver.version),
|
||||
version:(opt.input?.etc?.version || opt.dot?.semver?.version),
|
||||
root:opt.dot.root,
|
||||
UID:(opt.input?.etc?.uid || 1000),
|
||||
GID:(opt.input?.etc?.gid || 1000),
|
||||
@@ -123,22 +128,25 @@ jobs:
|
||||
docker.app.suffix = docker.image.suffix;
|
||||
|
||||
// setup tags
|
||||
if(!opt.dot?.semver?.disable?.rolling){
|
||||
docker.image.tags.push('rolling');
|
||||
}
|
||||
if(opt.input?.etc?.dockerfile !== 'arch.dockerfile' && opt.input?.etc?.tag){
|
||||
docker.image.tags.push(`${context.sha.substring(0,7)}`);
|
||||
docker.image.tags.push(opt.input.etc.tag);
|
||||
docker.image.tags.push(`${opt.input.etc.tag}-${docker.app.version}`);
|
||||
docker.cache.name = `${docker.image.name}:buildcache-${opt.input.etc.tag}`;
|
||||
}else if(opt.dot?.semver?.version){
|
||||
const semver = opt.dot.semver.version.split('.');
|
||||
}else if(docker.app.version !== 'latest'){
|
||||
const semver = docker.app.version.split('.');
|
||||
docker.image.tags.push(`${context.sha.substring(0,7)}`);
|
||||
if(Array.isArray(semver)){
|
||||
if(semver.length >= 1) docker.image.tags.push(`${semver[0]}`);
|
||||
if(semver.length >= 2) docker.image.tags.push(`${semver[0]}.${semver[1]}`);
|
||||
if(semver.length >= 3) docker.image.tags.push(`${semver[0]}.${semver[1]}.${semver[2]}`);
|
||||
}
|
||||
if(opt.dot.semver?.stable && new RegExp(opt.dot.semver.stable, 'ig').test(docker.image.tags.join(','))) docker.image.tags.push('stable');
|
||||
if(opt.dot.semver?.latest && new RegExp(opt.dot.semver.latest, 'ig').test(docker.image.tags.join(','))) docker.image.tags.push('latest');
|
||||
}else if(opt.input?.etc?.version && opt.input.etc.version === 'latest'){
|
||||
if(opt.dot?.semver?.stable && new RegExp(opt.dot?.semver.stable, 'ig').test(docker.image.tags.join(','))) docker.image.tags.push('stable');
|
||||
if(opt.dot?.semver?.latest && new RegExp(opt.dot?.semver.latest, 'ig').test(docker.image.tags.join(','))) docker.image.tags.push('latest');
|
||||
}else{
|
||||
docker.image.tags.push('latest');
|
||||
}
|
||||
|
||||
@@ -154,6 +162,11 @@ jobs:
|
||||
docker.app[arg] = opt.input.etc.build.args[arg];
|
||||
}
|
||||
}
|
||||
if(opt.dot?.build?.args){
|
||||
for(const arg in opt.dot.build.args){
|
||||
docker.app[arg] = opt.dot.build.args[arg];
|
||||
}
|
||||
}
|
||||
const arguments = [];
|
||||
for(const argument in docker.app){
|
||||
arguments.push(`APP_${argument.toUpperCase()}=${docker.app[argument]}`);
|
||||
@@ -171,10 +184,16 @@ jobs:
|
||||
core.exportVariable('DOCKER_IMAGE_ARGUMENTS', arguments.join("\r\n"));
|
||||
core.exportVariable('DOCKER_IMAGE_DOCKERFILE', opt.input?.etc?.dockerfile || 'arch.dockerfile');
|
||||
|
||||
core.exportVariable('WORKFLOW_BUILD', (opt.input?.build === undefined) ? false : opt.input.build);
|
||||
core.exportVariable('WORKFLOW_CREATE_RELEASE', (opt.input?.release === undefined) ? false : opt.input.release);
|
||||
core.exportVariable('WORKFLOW_CREATE_README', (opt.input?.readme === undefined) ? false : opt.input.readme);
|
||||
core.exportVariable('WORKFLOW_GRYPE_FAIL_ON_SEVERITY', (opt.dot?.grype?.fail === undefined) ? true : opt.dot.grype.fail);
|
||||
core.exportVariable('WORKFLOW_GRYPE_SEVERITY_CUTOFF', (opt.dot?.grype?.severity || 'high'));
|
||||
if(opt.dot?.readme?.comparison){
|
||||
core.exportVariable('WORKFLOW_CREATE_COMPARISON', true);
|
||||
core.exportVariable('WORKFLOW_CREATE_COMPARISON_FOREIGN_IMAGE', opt.dot.readme.comparison.image);
|
||||
core.exportVariable('WORKFLOW_CREATE_COMPARISON_IMAGE', `${docker.image.name}:${docker.app.version}`);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -200,14 +219,17 @@ jobs:
|
||||
password: ${{ secrets.QUAY_TOKEN }}
|
||||
|
||||
- name: docker / setup qemu
|
||||
if: env.WORKFLOW_BUILD == 'true'
|
||||
uses: docker/setup-qemu-action@53851d14592bedcffcf25ea515637cff71ef929a
|
||||
|
||||
- name: docker / setup buildx
|
||||
if: env.WORKFLOW_BUILD == 'true'
|
||||
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5
|
||||
with:
|
||||
driver-opts: network=host
|
||||
|
||||
- name: docker / build & push & tag grype
|
||||
- name: docker / build image locally
|
||||
if: env.WORKFLOW_BUILD == 'true'
|
||||
id: docker-build
|
||||
uses: docker/build-push-action@67a2d409c0a876cbe6b11854e3e25193efe4e62d
|
||||
with:
|
||||
@@ -223,6 +245,7 @@ jobs:
|
||||
${{ env.DOCKER_CACHE_GRYPE }}
|
||||
|
||||
- name: grype / scan
|
||||
if: env.WORKFLOW_BUILD == 'true'
|
||||
id: grype
|
||||
uses: anchore/scan-action@dc6246fcaf83ae86fcc6010b9824c30d7320729e
|
||||
with:
|
||||
@@ -234,7 +257,7 @@ jobs:
|
||||
cache-db: true
|
||||
|
||||
- name: grype / fail
|
||||
if: failure() || steps.grype.outcome == 'failure'
|
||||
if: env.WORKFLOW_BUILD == 'true' && (failure() || steps.grype.outcome == 'failure') && steps.docker-build.outcome == 'success'
|
||||
uses: anchore/scan-action@dc6246fcaf83ae86fcc6010b9824c30d7320729e
|
||||
with:
|
||||
image: ${{ env.DOCKER_CACHE_GRYPE }}
|
||||
@@ -244,7 +267,8 @@ jobs:
|
||||
by-cve: true
|
||||
cache-db: true
|
||||
|
||||
- name: docker / build & push
|
||||
- name: docker / build image from cache and push to registries
|
||||
if: env.WORKFLOW_BUILD == 'true'
|
||||
uses: docker/build-push-action@67a2d409c0a876cbe6b11854e3e25193efe4e62d
|
||||
with:
|
||||
context: .
|
||||
@@ -263,21 +287,8 @@ jobs:
|
||||
|
||||
|
||||
# RELEASE
|
||||
- name: github / release / log
|
||||
continue-on-error: true
|
||||
id: git-log
|
||||
run: |
|
||||
LOCAL_LAST_TAG=$(git describe --abbrev=0 --tags `git rev-list --tags --skip=1 --max-count=1`)
|
||||
echo "using last tag: ${LOCAL_LAST_TAG}"
|
||||
LOCAL_COMMITS=$(git log ${LOCAL_LAST_TAG}..HEAD --oneline)
|
||||
|
||||
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
|
||||
echo "commits<<${EOF}" >> ${GITHUB_OUTPUT}
|
||||
echo "${LOCAL_COMMITS}" >> ${GITHUB_OUTPUT}
|
||||
echo "${EOF}" >> ${GITHUB_OUTPUT}
|
||||
|
||||
- name: github / release / markdown
|
||||
if: env.WORKFLOW_CREATE_RELEASE == 'true' && steps.git-log.outcome == 'success'
|
||||
if: env.WORKFLOW_CREATE_RELEASE == 'true'
|
||||
id: git-release
|
||||
uses: 11notes/action-docker-release@v1
|
||||
# WHY IS THIS ACTION NOT SHA256 PINNED? SECURITY MUCH?!?!?!
|
||||
@@ -286,8 +297,6 @@ jobs:
|
||||
# in the repo. This code is not modified and can't be modified by this action.
|
||||
# It does create the markdown for the release, which could be abused, but to what
|
||||
# extend? Adding a link to a malicious repo?
|
||||
with:
|
||||
git_log: ${{ steps.git-log.outputs.commits }}
|
||||
|
||||
- name: github / release / create
|
||||
if: env.WORKFLOW_CREATE_RELEASE == 'true' && steps.git-release.outcome == 'success'
|
||||
@@ -333,15 +342,27 @@ jobs:
|
||||
|
||||
|
||||
# README
|
||||
- name: github / checkout master
|
||||
- name: github / checkout HEAD
|
||||
continue-on-error: true
|
||||
run: |
|
||||
git checkout master
|
||||
run: |
|
||||
git checkout HEAD
|
||||
|
||||
- name: docker / setup comparison images
|
||||
if: env.WORKFLOW_CREATE_COMPARISON == 'true'
|
||||
continue-on-error: true
|
||||
run: |
|
||||
docker image pull ${{ env.WORKFLOW_CREATE_COMPARISON_IMAGE }}
|
||||
docker image ls --filter "reference=${{ env.WORKFLOW_CREATE_COMPARISON_IMAGE }}" --format json | jq --raw-output '.Size' &> ./comparison.size0.log
|
||||
|
||||
docker image pull ${{ env.WORKFLOW_CREATE_COMPARISON_FOREIGN_IMAGE }}
|
||||
docker image ls --filter "reference=${{ env.WORKFLOW_CREATE_COMPARISON_FOREIGN_IMAGE }}" --format json | jq --raw-output '.Size' &> ./comparison.size1.log
|
||||
|
||||
docker run --entrypoint "/bin/sh" --rm ${{ env.WORKFLOW_CREATE_COMPARISON_FOREIGN_IMAGE }} -c id &> ./comparison.id.log
|
||||
|
||||
- name: github / create README.md
|
||||
id: github-readme
|
||||
continue-on-error: true
|
||||
if: env.WORKFLOW_CREATE_README == 'true' && steps.docker-build.outcome == 'success'
|
||||
if: env.WORKFLOW_CREATE_README == 'true'
|
||||
uses: 11notes/action-docker-readme@v1
|
||||
# WHY IS THIS ACTION NOT SHA256 PINNED? SECURITY MUCH?!?!?!
|
||||
# ---------------------------------------------------------------------------------
|
||||
@@ -367,17 +388,6 @@ jobs:
|
||||
short_description: ${{ env.DOCKER_IMAGE_DESCRIPTION }}
|
||||
readme_file: 'README_NONGITHUB.md'
|
||||
|
||||
- name: quay / push README.md to quay
|
||||
continue-on-error: true
|
||||
if: steps.github-readme.outcome == 'success' && hashFiles('README_NONGITHUB.md') != ''
|
||||
uses: christian-korneck/update-container-description-action@d36005551adeaba9698d8d67a296bd16fa91f8e8
|
||||
env:
|
||||
DOCKER_APIKEY: ${{ secrets.QUAY_TOKEN }}
|
||||
with:
|
||||
destination_container_repo: quay.io/${{ env.DOCKER_IMAGE_NAME }}
|
||||
provider: quay
|
||||
readme_file: 'README_NONGITHUB.md'
|
||||
|
||||
- name: github / commit & push
|
||||
continue-on-error: true
|
||||
if: steps.github-readme.outcome == 'success' && hashFiles('README.md') != ''
|
||||
@@ -388,11 +398,14 @@ jobs:
|
||||
if [ -f compose.yaml ]; then
|
||||
git add compose.yaml
|
||||
fi
|
||||
if [ -f compose.yml ]; then
|
||||
git add compose.yml
|
||||
fi
|
||||
if [ -f LICENSE ]; then
|
||||
git add LICENSE
|
||||
fi
|
||||
git commit -m "auto update README.md"
|
||||
git push
|
||||
git commit -m "update README.md"
|
||||
git push origin HEAD:master
|
||||
|
||||
|
||||
|
||||
|
16
.github/workflows/readme.yml
vendored
Normal file
16
.github/workflows/readme.yml
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
name: readme
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
readme:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: update README.md
|
||||
uses: the-actions-org/workflow-dispatch@3133c5d135c7dbe4be4f9793872b6ef331b53bc7
|
||||
with:
|
||||
wait-for-completion: false
|
||||
workflow: docker.yml
|
||||
token: "${{ secrets.REPOSITORY_TOKEN }}"
|
||||
inputs: '{ "build":"false", "release":"false", "readme":"true" }'
|
12
.json
12
.json
@@ -2,16 +2,15 @@
|
||||
"image":"11notes/nginx",
|
||||
"name":"nginx",
|
||||
"root":"/nginx",
|
||||
"arch":"linux/amd64,linux/arm64,linux/arm/v7",
|
||||
|
||||
"semver":{
|
||||
"version":"1.26.3",
|
||||
"stable":"1.26.3",
|
||||
"latest":"1.26.3"
|
||||
"version":"1.28.0",
|
||||
"stable":"1.28.0"
|
||||
},
|
||||
|
||||
"readme":{
|
||||
"description":"Nginx, slim and distroless to be used behind a reverse proxy or as full version",
|
||||
"description":"Nginx, slim and distroless to be used behind a reverse proxy or as full version as a proxy",
|
||||
"introduction": "nginx (engine x) is an HTTP web server, reverse proxy, content cache, load balancer, TCP/UDP proxy server, and mail proxy server.",
|
||||
"built":{
|
||||
"nginx":"https://nginx.org"
|
||||
},
|
||||
@@ -20,6 +19,9 @@
|
||||
"11notes/distroless",
|
||||
"11notes/distroless:curl"
|
||||
]
|
||||
},
|
||||
"comparison":{
|
||||
"image":"nginx:1.28.0"
|
||||
}
|
||||
}
|
||||
}
|
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2020 11notes
|
||||
Copyright (c) 2025 11notes
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
184
README.md
184
README.md
@@ -1,49 +1,156 @@
|
||||

|
||||
|
||||
# ⛰️ nginx
|
||||
[<img src="https://img.shields.io/badge/github-source-blue?logo=github&color=040308">](https://github.com/11notes/docker-nginx)[<img src="https://img.shields.io/github/issues/11notes/docker-nginx?color=7842f5">](https://github.com/11notes/docker-nginx/issues)
|
||||
# NGINX
|
||||
[<img src="https://img.shields.io/github/issues/11notes/docker-NGINX?color=7842f5">](https://github.com/11notes/docker-NGINX/issues)
|
||||
|
||||
Nginx with additional plugins and custom compiled
|
||||
Nginx, slim and distroless to be used behind a reverse proxy or as full version as a proxy
|
||||
|
||||
# MAIN TAGS 🏷️
|
||||
These are the main tags for the image. There is also a tag for each commit and its shorthand sha256 value.
|
||||
# INTRODUCTION 📢
|
||||
|
||||
* [1.26.3](https://hub.docker.com/r/11notes/nginx/tags?name=1.26.3)
|
||||
* [stable](https://hub.docker.com/r/11notes/nginx/tags?name=stable)
|
||||
* [latest](https://hub.docker.com/r/11notes/nginx/tags?name=latest)
|
||||
* [1.26.3-unraid](https://hub.docker.com/r/11notes/nginx/tags?name=1.26.3-unraid)
|
||||
* [stable-unraid](https://hub.docker.com/r/11notes/nginx/tags?name=stable-unraid)
|
||||
* [latest-unraid](https://hub.docker.com/r/11notes/nginx/tags?name=latest-unraid)
|
||||
|
||||
# UNRAID VERSION 🟠
|
||||
This image supports unraid by default. Simply add **-unraid** to any tag and the image will run as 99:100 instead of 1000:1000 causing no issues on unraid. Enjoy.
|
||||
nginx (engine x) is an HTTP web server, reverse proxy, content cache, load balancer, TCP/UDP proxy server, and mail proxy server.
|
||||
|
||||
# SYNOPSIS 📖
|
||||
**What can I do with this?** What can I do with this? This image will serve as a base for nginx related images that need a high-performance webserver. It can also be used stand alone as a webserver or reverse proxy. It will automatically reload on config changes if configured.
|
||||
**What can I do with this?** This image will serve as a base for nginx related images that need a high-performance webserver. The default tag of this image is stripped for most functions that can be used by a reverse proxy in front of nginx, it adds however important webserver functions like brotli compression. The default tag is not meant to run as a reverse proxy, use the full image for that. **The default tag does not support HTTPS for instance!**
|
||||
|
||||
# UNIQUE VALUE PROPOSITION 💶
|
||||
**Why should I run this image and not the other image(s) that already exist?** Good question! Because ...
|
||||
|
||||
> [!IMPORTANT]
|
||||
>* ... this image runs [rootless](https://github.com/11notes/RTFM/blob/main/linux/container/image/rootless.md) as 1000:1000
|
||||
>* ... this image has no shell since it is [distroless](https://github.com/11notes/RTFM/blob/main/linux/container/image/distroless.md)
|
||||
>* ... this image is auto updated to the latest version via CI/CD
|
||||
>* ... this image has a health check
|
||||
>* ... this image runs read-only
|
||||
>* ... this image is automatically scanned for CVEs before and after publishing
|
||||
>* ... this image is created via a secure and pinned CI/CD process
|
||||
>* ... this image verifies external payloads if possible
|
||||
>* ... this image is very small
|
||||
|
||||
If you value security, simplicity and optimizations to the extreme, then this image might be for you.
|
||||
|
||||
# COMPARISON 🏁
|
||||
Below you find a comparison between this image and the most used or original one.
|
||||
|
||||
| **image** | 11notes/nginx:1.28.0 | nginx:1.28.0 |
|
||||
| ---: | :---: | :---: |
|
||||
| **image size on disk** | 3.69MB | 192MB |
|
||||
| **process UID/GID** | 1000/1000 | 0/0 |
|
||||
| **distroless?** | ✅ | ❌ |
|
||||
| **rootless?** | ✅ | ❌ |
|
||||
|
||||
|
||||
|
||||
# DEFAULT CONFIG 📑
|
||||
```yaml
|
||||
worker_processes auto;
|
||||
worker_cpu_affinity auto;
|
||||
worker_rlimit_nofile 204800;
|
||||
error_log /nginx/log/error.log warn;
|
||||
daemon off;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
use epoll;
|
||||
multi_accept on;
|
||||
}
|
||||
|
||||
http {
|
||||
log_format main escape=json '{"log":"main","time":"$time_iso8601","server":{"name":"$server_name", "protocol":"$server_protocol"}, "client":{"ip":"$remote_addr", "x-forwarded-for":"$http_x_forwarded_for", "user":"$remote_user"},"request":{"method":"$request_method", "url":"$request_uri", "time":"$request_time", "status":$status}}';
|
||||
log_format proxy escape=json '{"log":"proxy", "time":"$time_iso8601","server":{"name":"$server_name", "protocol":"$server_protocol"}}, "client":{"ip":"$remote_addr", "x-forwarded-for":"$http_x_forwarded_for", "user":"$remote_user"},"request":{"method":"$request_method", "url":"$request_uri", "time":"$request_time", "status":$status}, "proxy":{"host":"$upstream_addr", "time":{"connect":"$upstream_connect_time", "response":"$upstream_response_time", "header":"$upstream_header_time"}, "io":{"bytes":{"sent":"$upstream_bytes_sent", "received":"$upstream_bytes_received"}}, "cache":"$upstream_cache_status", "status":"$upstream_status"}}';
|
||||
|
||||
access_log off;
|
||||
server_tokens off;
|
||||
|
||||
include mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
sendfile on;
|
||||
aio on;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
gzip on;
|
||||
|
||||
brotli on;
|
||||
brotli_comp_level 4;
|
||||
brotli_static on;
|
||||
brotli_types
|
||||
text/plain
|
||||
text/css
|
||||
text/xml
|
||||
text/javascript
|
||||
text/x-component
|
||||
application/xml
|
||||
application/xml+rss
|
||||
application/javascript
|
||||
application/json
|
||||
application/atom+xml
|
||||
application/vnd.ms-fontobject
|
||||
application/x-font-ttf
|
||||
application/x-font-opentype
|
||||
application/x-font-truetype
|
||||
application/x-web-app-manifest+json
|
||||
application/xhtml+xml
|
||||
application/octet-stream
|
||||
font/opentype
|
||||
font/truetype
|
||||
font/eot
|
||||
font/otf
|
||||
image/svg+xml
|
||||
image/x-icon
|
||||
image/vnd.microsoft.icon
|
||||
image/bmp;
|
||||
|
||||
client_max_body_size 8M;
|
||||
keepalive_timeout 90;
|
||||
keepalive_requests 102400;
|
||||
reset_timedout_connection on;
|
||||
client_body_timeout 10;
|
||||
send_timeout 5;
|
||||
|
||||
open_file_cache max=204800 inactive=5m;
|
||||
open_file_cache_valid 2m;
|
||||
open_file_cache_min_uses 2;
|
||||
open_file_cache_errors off;
|
||||
|
||||
root /nginx/var;
|
||||
|
||||
include /nginx/etc/*.conf;
|
||||
}
|
||||
```
|
||||
|
||||
The default configuration contains no special settings. It enables brotli compression, sets the workers to the same amount as n-CPUs available, has two default logging formats, disables most stuff not needed and enables best performance settings. Please mount your own config if you need to change how nginx is setup.
|
||||
|
||||
# VOLUMES 📁
|
||||
* **/nginx/etc** - Directory of vHost config, must end in *.conf (set in /etc/nginx/nginx.conf)
|
||||
* **/nginx/etc** - Directory of vHost config, must end in *.conf
|
||||
* **/nginx/var** - Directory of webroot for vHost
|
||||
|
||||
# COMPOSE ✂️
|
||||
```yaml
|
||||
name: "nginx"
|
||||
services:
|
||||
nginx:
|
||||
image: "11notes/nginx:1.26.2"
|
||||
container_name: "nginx"
|
||||
image: "11notes/nginx:1.28.0"
|
||||
read_only: true
|
||||
environment:
|
||||
TZ: "Europe/Zurich"
|
||||
ports:
|
||||
- "8443:8443/tcp"
|
||||
- "3000:3000/tcp"
|
||||
networks:
|
||||
frontend:
|
||||
volumes:
|
||||
- "etc:/nginx/etc"
|
||||
- "var:/nginx/var"
|
||||
- "ssl:/nginx/ssl"
|
||||
tmpfs:
|
||||
- "/nginx/cache:uid=1000,gid=1000"
|
||||
- "/nginx/run:uid=1000,gid=1000"
|
||||
restart: "always"
|
||||
|
||||
volumes:
|
||||
etc:
|
||||
var:
|
||||
ssl:
|
||||
|
||||
networks:
|
||||
frontend:
|
||||
```
|
||||
|
||||
# DEFAULT SETTINGS 🗃️
|
||||
@@ -59,23 +166,44 @@ volumes:
|
||||
| --- | --- | --- |
|
||||
| `TZ` | [Time Zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) | |
|
||||
| `DEBUG` | Will activate debug option for container image and app (if available) | |
|
||||
| `NGINX_DYNAMIC_RELOAD` | Enable reload of nginx on configuration changes in /nginx/etc (only on successful configuration test!) | |
|
||||
| `NGINX_HEALTHCHECK_URL` | URL to check if nginx is ready to accept connections | https://localhost:8443/ping |
|
||||
|
||||
# MAIN TAGS 🏷️
|
||||
These are the main tags for the image. There is also a tag for each commit and its shorthand sha256 value.
|
||||
|
||||
* [1.28.0](https://hub.docker.com/r/11notes/nginx/tags?name=1.28.0)
|
||||
* [stable](https://hub.docker.com/r/11notes/nginx/tags?name=stable)
|
||||
|
||||
### There is no latest tag, what am I supposed to do about updates?
|
||||
It is of my opinion that the ```:latest``` tag is dangerous. Many times, I’ve introduced **breaking** changes to my images. This would have messed up everything for some people. If you don’t want to change the tag to the latest [semver](https://semver.org/), simply use the short versions of [semver](https://semver.org/). Instead of using ```:1.28.0``` you can use ```:1``` or ```:1.28```. Since on each new version these tags are updated to the latest version of the software, using them is identical to using ```:latest``` but at least fixed to a major or minor version.
|
||||
|
||||
If you still insist on having the bleeding edge release of this app, simply use the ```:rolling``` tag, but be warned! You will get the latest version of the app instantly, regardless of breaking changes or security issues or what so ever. You do this at your own risk!
|
||||
|
||||
# REGISTRIES ☁️
|
||||
```
|
||||
docker pull 11notes/nginx:1.28.0
|
||||
docker pull ghcr.io/11notes/nginx:1.28.0
|
||||
docker pull quay.io/11notes/nginx:1.28.0
|
||||
```
|
||||
|
||||
# SOURCE 💾
|
||||
* [11notes/nginx](https://github.com/11notes/docker-nginx)
|
||||
* [11notes/nginx](https://github.com/11notes/docker-NGINX)
|
||||
|
||||
# PARENT IMAGE 🏛️
|
||||
* [11notes/alpine:stable](https://hub.docker.com/r/11notes/alpine)
|
||||
> [!IMPORTANT]
|
||||
>This image is not based on another image but uses [scratch](https://hub.docker.com/_/scratch) as the starting layer.
|
||||
>The image consists of the following distroless layers that were added:
|
||||
>* [11notes/distroless](https://github.com/11notes/docker-distroless/blob/master/arch.dockerfile) - contains users, timezones and Root CA certificates
|
||||
>* [11notes/distroless:curl](https://github.com/11notes/docker-distroless/blob/master/curl.dockerfile) - app to execute HTTP requests
|
||||
|
||||
# BUILT WITH 🧰
|
||||
* [nginx](https://nginx.org)
|
||||
|
||||
# GENERAL TIPS 📌
|
||||
* Use a reverse proxy like Traefik, Nginx, HAproxy to terminate TLS and to protect your endpoints
|
||||
* Use Let’s Encrypt DNS-01 challenge to obtain valid SSL certificates for your services
|
||||
> [!TIP]
|
||||
>* Use a reverse proxy like Traefik, Nginx, HAproxy to terminate TLS and to protect your endpoints
|
||||
>* Use Let’s Encrypt DNS-01 challenge to obtain valid SSL certificates for your services
|
||||
|
||||
# ElevenNotes™️
|
||||
This image is provided to you at your own risk. Always make backups before updating an image to a different version. Check the [releases](https://github.com/11notes/docker-nginx/releases) for breaking changes. If you have any problems with using this image simply raise an [issue](https://github.com/11notes/docker-nginx/issues), thanks. If you have a question or inputs please create a new [discussion](https://github.com/11notes/docker-nginx/discussions) instead of an issue. You can find all my other repositories on [github](https://github.com/11notes?tab=repositories).
|
||||
|
||||
*created 11.3.2025, 07:50:49 (CET)*
|
||||
*created 03.08.2025, 03:35:59 (CET)*
|
247
arch.dockerfile
247
arch.dockerfile
@@ -1,40 +1,70 @@
|
||||
ARG APP_UID=1000
|
||||
ARG APP_GID=1000
|
||||
# ╔═════════════════════════════════════════════════════╗
|
||||
# ║ SETUP ║
|
||||
# ╚═════════════════════════════════════════════════════╝
|
||||
# GLOBAL
|
||||
ARG APP_UID=1000 \
|
||||
APP_GID=1000 \
|
||||
APP_VERSION=0 \
|
||||
BUILD_NGINX_CONFIGURATION=light \
|
||||
BUILD_DEPENDENCY_OPENSSL_VERSION=3.5.1 \
|
||||
BUILD_DEPENDENCY_ZLIB_VERSION=1.3.1 \
|
||||
BUILD_DEPENDENCY_ZLIB_SHA256=9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23 \
|
||||
BUILD_DEPENDENCY_PCRE2_VERSION=10.45 \
|
||||
BUILD_DEPENDENCY_HEADERS_MORE_VERSION=0.39 \
|
||||
BUILD_DEPENDENCY_QUICKJS_VERSION= \
|
||||
BUILD_DEPENDENCY_NJS_VERSION=0.8.10 \
|
||||
BUILD_NGINX_PREFIX=/etc/nginx
|
||||
|
||||
# :: Util
|
||||
FROM 11notes/util AS util
|
||||
ARG BUILD_ROOT=/nginx-${APP_VERSION} \
|
||||
BUILD_DEPENDENCY_OPENSSL_ROOT=/openssl-${BUILD_DEPENDENCY_OPENSSL_VERSION} \
|
||||
BUILD_DEPENDENCY_ZLIB_ROOT=/zlib-${BUILD_DEPENDENCY_ZLIB_VERSION} \
|
||||
BUILD_DEPENDENCY_PCRE2_ROOT=/pcre2-${BUILD_DEPENDENCY_PCRE2_VERSION} \
|
||||
BUILD_DEPENDENCY_HEADERS_MORE_ROOT=/headers-more-nginx-module-${BUILD_DEPENDENCY_HEADERS_MORE_VERSION} \
|
||||
BUILD_DEPENDENCY_BROTLI_ROOT=/ngx_brotli \
|
||||
BUILD_DEPENDENCY_NJS_ROOT=/njs-${BUILD_DEPENDENCY_NJS_VERSION} \
|
||||
BUILD_DEPENDENCY_QUICKJS_ROOT=/quickjs${BUILD_DEPENDENCY_QUICKJS_VERSION} \
|
||||
BUILD_BIN=${BUILD_ROOT}/objs/nginx
|
||||
|
||||
# :: Build / nginx
|
||||
# :: FOREIGN IMAGES
|
||||
FROM 11notes/distroless AS distroless
|
||||
FROM 11notes/distroless:curl AS distroless-curl
|
||||
FROM 11notes/util:bin AS util-bin
|
||||
|
||||
# ╔═════════════════════════════════════════════════════╗
|
||||
# ║ BUILD ║
|
||||
# ╚═════════════════════════════════════════════════════╝
|
||||
# :: NGINX
|
||||
FROM alpine AS build
|
||||
ARG TARGETARCH
|
||||
ARG TARGETPLATFORM
|
||||
ARG TARGETVARIANT
|
||||
ARG APP_ROOT
|
||||
ARG APP_VERSION
|
||||
ARG APP_NGINX_CONFIGURATION
|
||||
ENV BUILD_ROOT=/nginx-${APP_VERSION}
|
||||
ENV BUILD_BIN=${BUILD_ROOT}/objs/nginx
|
||||
ENV NGINX_PREFIX=/etc/nginx
|
||||
ENV BUILD_DEPENDENCY_OPENSSL_VERSION=3.5.0
|
||||
ENV BUILD_DEPENDENCY_OPENSSL_ROOT=/openssl-${BUILD_DEPENDENCY_OPENSSL_VERSION}
|
||||
ENV BUILD_DEPENDENCY_ZLIB_VERSION=1.3.1
|
||||
ENV BUILD_DEPENDENCY_ZLIB_ROOT=/zlib-${BUILD_DEPENDENCY_ZLIB_VERSION}
|
||||
ENV BUILD_DEPENDENCY_PCRE2_VERSION=10.45
|
||||
ENV BUILD_DEPENDENCY_PCRE2_ROOT=/pcre2-${BUILD_DEPENDENCY_PCRE2_VERSION}
|
||||
ENV BUILD_DEPENDENCY_HEADERS_MORE_VERSION=0.38
|
||||
ENV BUILD_DEPENDENCY_HEADERS_MORE_ROOT=/headers-more-nginx-module-${BUILD_DEPENDENCY_HEADERS_MORE_VERSION}
|
||||
ENV BUILD_DEPENDENCY_BROTLI_ROOT=/ngx_brotli
|
||||
ENV BUILD_DEPENDENCY_NJS_VERSION=0.8.10
|
||||
ENV BUILD_DEPENDENCY_NJS_ROOT=/njs-${BUILD_DEPENDENCY_NJS_VERSION}
|
||||
ENV BUILD_DEPENDENCY_QUICKJS_VERSION=
|
||||
ENV BUILD_DEPENDENCY_QUICKJS_ROOT=/quickjs${BUILD_DEPENDENCY_QUICKJS_VERSION}
|
||||
COPY --from=util-bin / /
|
||||
COPY ./key.txt /
|
||||
|
||||
USER root
|
||||
|
||||
COPY --from=util /usr/local/bin/ /usr/local/bin
|
||||
ARG APP_UID \
|
||||
APP_GID \
|
||||
APP_VERSION \
|
||||
APP_ROOT \
|
||||
BUILD_DEPENDENCY_OPENSSL_VERSION \
|
||||
BUILD_DEPENDENCY_ZLIB_VERSION \
|
||||
BUILD_DEPENDENCY_ZLIB_SHA256 \
|
||||
BUILD_DEPENDENCY_PCRE2_VERSION \
|
||||
BUILD_DEPENDENCY_HEADERS_MORE_VERSION \
|
||||
BUILD_DEPENDENCY_QUICKJS_VERSION \
|
||||
BUILD_DEPENDENCY_NJS_VERSION \
|
||||
BUILD_NGINX_PREFIX \
|
||||
BUILD_NGINX_CONFIGURATION \
|
||||
BUILD_ROOT \
|
||||
BUILD_DEPENDENCY_OPENSSL_ROOT \
|
||||
BUILD_DEPENDENCY_ZLIB_ROOT \
|
||||
BUILD_DEPENDENCY_PCRE2_ROOT \
|
||||
BUILD_DEPENDENCY_HEADERS_MORE_ROOT \
|
||||
BUILD_DEPENDENCY_BROTLI_ROOT \
|
||||
BUILD_DEPENDENCY_NJS_ROOT \
|
||||
BUILD_DEPENDENCY_QUICKJS_ROOT \
|
||||
BUILD_BIN
|
||||
|
||||
RUN set -ex; \
|
||||
apk --update --no-cache add \
|
||||
gpg \
|
||||
gpg-agent \
|
||||
cmake \
|
||||
autoconf \
|
||||
automake \
|
||||
@@ -67,60 +97,63 @@ ARG APP_GID=1000
|
||||
brotli-dev \
|
||||
libgd \
|
||||
tar \
|
||||
xz \
|
||||
upx;
|
||||
pv \
|
||||
jq \
|
||||
xz;
|
||||
|
||||
RUN set -ex; \
|
||||
gpg --import /key.txt;
|
||||
|
||||
RUN set -ex; \
|
||||
cd /; \
|
||||
curl -SL https://nginx.org/download/nginx-${APP_VERSION}.tar.gz | tar -zxC /; \
|
||||
curl -SL https://zlib.net/fossils/zlib-${BUILD_DEPENDENCY_ZLIB_VERSION}.tar.gz | tar -zxC /; \
|
||||
curl -SL https://github.com/PCRE2Project/pcre2/releases/download/pcre2-${BUILD_DEPENDENCY_PCRE2_VERSION}/pcre2-${BUILD_DEPENDENCY_PCRE2_VERSION}.tar.gz | tar -zxC /; \
|
||||
curl -SL https://github.com/openresty/headers-more-nginx-module/archive/v${BUILD_DEPENDENCY_HEADERS_MORE_VERSION}.tar.gz | tar -zxC /;
|
||||
eleven asset gpg-asc https://nginx.org/download/nginx-${APP_VERSION}.tar.gz https://nginx.org/download/nginx-${APP_VERSION}.tar.gz.asc; \
|
||||
eleven asset sha256 https://zlib.net/zlib-${BUILD_DEPENDENCY_ZLIB_VERSION}.tar.gz ${BUILD_DEPENDENCY_ZLIB_SHA256}; \
|
||||
eleven github asset PCRE2Project/pcre2 pcre2-${BUILD_DEPENDENCY_PCRE2_VERSION} pcre2-${BUILD_DEPENDENCY_PCRE2_VERSION}.tar.gz; \
|
||||
eleven github asset openresty/headers-more-nginx-module v${BUILD_DEPENDENCY_HEADERS_MORE_VERSION} v${BUILD_DEPENDENCY_HEADERS_MORE_VERSION}.tar.gz;
|
||||
|
||||
RUN set -ex; \
|
||||
#build OpenSSL
|
||||
case "${APP_NGINX_CONFIGURATION}" in \
|
||||
case "${BUILD_NGINX_CONFIGURATION}" in \
|
||||
"full") \
|
||||
cd /; \
|
||||
curl -SL https://github.com/openssl/openssl/releases/download/openssl-${BUILD_DEPENDENCY_OPENSSL_VERSION}/openssl-${BUILD_DEPENDENCY_OPENSSL_VERSION}.tar.gz | tar -zxC /; \
|
||||
eleven github asset openssl/openssl openssl-${BUILD_DEPENDENCY_OPENSSL_VERSION} openssl-${BUILD_DEPENDENCY_OPENSSL_VERSION}.tar.gz; \
|
||||
;; \
|
||||
esac;
|
||||
|
||||
RUN set -ex; \
|
||||
# build brotli
|
||||
cd /; \
|
||||
git clone --recurse-submodules -j8 https://github.com/google/ngx_brotli; \
|
||||
eleven git clone google/ngx_brotli.git; \
|
||||
mkdir -p ${BUILD_DEPENDENCY_BROTLI_ROOT}/deps/brotli/out; \
|
||||
cd ${BUILD_DEPENDENCY_BROTLI_ROOT}/deps/brotli/out; \
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS="-Ofast -march=native -mtune=native -flto -funroll-loops -ffunction-sections -fdata-sections -Wl,--gc-sections" -DCMAKE_CXX_FLAGS="-Ofast -march=native -mtune=native -flto -funroll-loops -ffunction-sections -fdata-sections -Wl,--gc-sections" -DCMAKE_INSTALL_PREFIX=./installed ..; \
|
||||
cmake --build . --config Release --target brotlienc;
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS="-Ofast -march=native -mtune=native -flto -funroll-loops -ffunction-sections -fdata-sections -Wl,--gc-sections" -DCMAKE_CXX_FLAGS="-Ofast -march=native -mtune=native -flto -funroll-loops -ffunction-sections -fdata-sections -Wl,--gc-sections" -DCMAKE_INSTALL_PREFIX=./installed .. 2>&1 > /dev/null; \
|
||||
cmake --build . --config Release --target brotlienc 2>&1 > /dev/null;
|
||||
|
||||
RUN set -ex; \
|
||||
#build QuickJS
|
||||
case "${APP_NGINX_CONFIGURATION}" in \
|
||||
case "${BUILD_NGINX_CONFIGURATION}" in \
|
||||
"full") \
|
||||
cd /; \
|
||||
git clone https://github.com/bellard/quickjs; \
|
||||
curl -SL https://github.com/nginx/njs/archive/refs/tags/${BUILD_DEPENDENCY_NJS_VERSION}.tar.gz | tar -zxC /; \
|
||||
eleven github asset nginx/njs ${BUILD_DEPENDENCY_NJS_VERSION} ${BUILD_DEPENDENCY_NJS_VERSION}.tar.gz; \
|
||||
cd ${BUILD_DEPENDENCY_QUICKJS_ROOT}; \
|
||||
CFLAGS='-fPIC -static -static-libgcc' make libquickjs.a; \
|
||||
CFLAGS='-fPIC -static -static-libgcc' make libquickjs.a 2>&1 > /dev/null; \
|
||||
;; \
|
||||
esac;
|
||||
|
||||
RUN set -ex; \
|
||||
#build XLST
|
||||
case "${APP_NGINX_CONFIGURATION}" in \
|
||||
case "${BUILD_NGINX_CONFIGURATION}" in \
|
||||
"full") \
|
||||
cd /; \
|
||||
curl -SL https://download.gnome.org/sources/libxml2/2.14/libxml2-2.14.1.tar.xz | tar -xJC /; \
|
||||
curl -SL https://download.gnome.org/sources/libxslt/1.1/libxslt-1.1.43.tar.xz | tar -xJC /; \
|
||||
eleven asset sha256-sum https://download.gnome.org/sources/libxml2/2.14/libxml2-2.14.1.tar.xz https://download.gnome.org/sources/libxml2/2.14/libxml2-2.14.1.sha256sum; \
|
||||
eleven asset sha256-sum https://download.gnome.org/sources/libxslt/1.1/libxslt-1.1.43.tar.xz https://download.gnome.org/sources/libxslt/1.1/libxslt-1.1.43.sha256sum; \
|
||||
cd /libxml2-2.14.1; \
|
||||
./configure \
|
||||
--prefix="/usr" \
|
||||
--disable-shared \
|
||||
--enable-static \
|
||||
--without-python; \
|
||||
make -s -j $(nproc); \
|
||||
make -s -j $(nproc) 2>&1 > /dev/null; \
|
||||
make install; \
|
||||
cd /libxslt-1.1.43; \
|
||||
./configure \
|
||||
@@ -128,13 +161,13 @@ ARG APP_GID=1000
|
||||
--disable-shared \
|
||||
--enable-static \
|
||||
--without-python; \
|
||||
make -s -j $(nproc); \
|
||||
make -s -j $(nproc) 2>&1 > /dev/null; \
|
||||
make install; \
|
||||
;; \
|
||||
esac;
|
||||
|
||||
RUN set -ex; \
|
||||
case "${APP_NGINX_CONFIGURATION}" in \
|
||||
case "${BUILD_NGINX_CONFIGURATION}" in \
|
||||
"light") \
|
||||
cd ${BUILD_ROOT}; \
|
||||
./configure \
|
||||
@@ -142,10 +175,10 @@ ARG APP_GID=1000
|
||||
--with-pcre=${BUILD_DEPENDENCY_PCRE2_ROOT} \
|
||||
--add-module=${BUILD_DEPENDENCY_HEADERS_MORE_ROOT} \
|
||||
--add-module=${BUILD_DEPENDENCY_BROTLI_ROOT} \
|
||||
--prefix=${NGINX_PREFIX} \
|
||||
--prefix=${BUILD_NGINX_PREFIX} \
|
||||
--sbin-path=${BUILD_BIN} \
|
||||
--modules-path=${APP_ROOT}/lib/modules \
|
||||
--conf-path=${NGINX_PREFIX}/nginx.conf \
|
||||
--conf-path=${BUILD_NGINX_PREFIX}/nginx.conf \
|
||||
--error-log-path=${APP_ROOT}/log/error.log \
|
||||
--http-log-path=${APP_ROOT}/log/access.log \
|
||||
--pid-path=${APP_ROOT}/run/nginx.pid \
|
||||
@@ -176,7 +209,6 @@ ARG APP_GID=1000
|
||||
--without-http_empty_gif_module \
|
||||
--without-http_geo_module \
|
||||
--without-http_memcached_module \
|
||||
--without-http_map_module \
|
||||
--without-http_ssi_module \
|
||||
--without-http_split_clients_module \
|
||||
--without-http_fastcgi_module \
|
||||
@@ -198,10 +230,10 @@ ARG APP_GID=1000
|
||||
--add-module=${BUILD_DEPENDENCY_BROTLI_ROOT} \
|
||||
--add-module=${BUILD_DEPENDENCY_NJS_ROOT}/nginx \
|
||||
--with-openssl=${BUILD_DEPENDENCY_OPENSSL_ROOT} \
|
||||
--prefix=${NGINX_PREFIX} \
|
||||
--prefix=${BUILD_NGINX_PREFIX} \
|
||||
--sbin-path=${BUILD_BIN} \
|
||||
--modules-path=${APP_ROOT}/lib/modules \
|
||||
--conf-path=${NGINX_PREFIX}/nginx.conf \
|
||||
--conf-path=${BUILD_NGINX_PREFIX}/nginx.conf \
|
||||
--error-log-path=${APP_ROOT}/log/error.log \
|
||||
--http-log-path=${APP_ROOT}/log/access.log \
|
||||
--pid-path=${APP_ROOT}/run/nginx.pid \
|
||||
@@ -247,78 +279,75 @@ ARG APP_GID=1000
|
||||
|
||||
RUN set -ex; \
|
||||
cd ${BUILD_ROOT}; \
|
||||
make -s -j $(nproc); \
|
||||
eleven checkStatic ${BUILD_BIN};
|
||||
make -s -j $(nproc);
|
||||
|
||||
RUN set -ex; \
|
||||
mkdir -p /distroless/usr/local/bin; \
|
||||
mkdir -p /distroless${NGINX_PREFIX}; \
|
||||
cp -R ${BUILD_ROOT}/conf/* /distroless${NGINX_PREFIX}; \
|
||||
rm /distroless${NGINX_PREFIX}/nginx.conf; \
|
||||
eleven strip ${BUILD_BIN}; \
|
||||
cp ${BUILD_BIN} /distroless/usr/local/bin;
|
||||
|
||||
COPY ./rootfs/etc /distroless/etc
|
||||
|
||||
# :: Distroless / nginx
|
||||
FROM scratch AS distroless-nginx
|
||||
COPY --from=build /distroless/ /
|
||||
|
||||
|
||||
# :: Build / file system
|
||||
FROM alpine AS fs
|
||||
ARG APP_ROOT
|
||||
USER root
|
||||
eleven distroless ${BUILD_BIN};
|
||||
|
||||
RUN set -ex; \
|
||||
mkdir -p ${APP_ROOT}/etc; \
|
||||
mkdir -p ${APP_ROOT}/var; \
|
||||
mkdir -p ${APP_ROOT}/run; \
|
||||
mkdir -p ${APP_ROOT}/lib/modules; \
|
||||
mkdir -p ${APP_ROOT}/cache; \
|
||||
mkdir -p ${APP_ROOT}/log; \
|
||||
ln -sf /dev/stdout ${APP_ROOT}/log/access.log; \
|
||||
ln -sf /dev/stderr ${APP_ROOT}/log/error.log;
|
||||
mkdir -p /distroless${BUILD_NGINX_PREFIX}; \
|
||||
cp -R ${BUILD_ROOT}/conf/* /distroless${BUILD_NGINX_PREFIX}; \
|
||||
rm /distroless${BUILD_NGINX_PREFIX}/nginx.conf;
|
||||
|
||||
COPY ./rootfs/nginx ${APP_ROOT}
|
||||
COPY ./rootfs/etc/nginx/ /distroless${BUILD_NGINX_PREFIX}
|
||||
|
||||
# :: Distroless / file system
|
||||
FROM scratch AS distroless-fs
|
||||
RUN set -ex; \
|
||||
ls -lah /distroless${BUILD_NGINX_PREFIX}; \
|
||||
cat /distroless${BUILD_NGINX_PREFIX}/nginx.conf;
|
||||
|
||||
# :: FILE-SYSTEM
|
||||
FROM alpine AS file-system
|
||||
ARG APP_ROOT
|
||||
COPY --from=fs ${APP_ROOT} /${APP_ROOT}
|
||||
COPY ./rootfs/nginx /distroless${APP_ROOT}
|
||||
|
||||
RUN set -ex; \
|
||||
mkdir -p /distroless${APP_ROOT}/etc; \
|
||||
mkdir -p /distroless${APP_ROOT}/var; \
|
||||
mkdir -p /distroless${APP_ROOT}/run; \
|
||||
mkdir -p /distroless${APP_ROOT}/lib/modules; \
|
||||
mkdir -p /distroless${APP_ROOT}/cache; \
|
||||
mkdir -p /distroless${APP_ROOT}/log; \
|
||||
ln -sf /dev/stdout /distroless${APP_ROOT}/log/access.log; \
|
||||
ln -sf /dev/stderr /distroless${APP_ROOT}/log/error.log;
|
||||
|
||||
|
||||
# :: Header
|
||||
FROM 11notes/distroless AS distroless
|
||||
FROM 11notes/distroless:curl AS distroless-curl
|
||||
# ╔═════════════════════════════════════════════════════╗
|
||||
# ║ IMAGE ║
|
||||
# ╚═════════════════════════════════════════════════════╝
|
||||
# :: HEADER
|
||||
FROM scratch
|
||||
|
||||
# :: arguments
|
||||
ARG TARGETARCH
|
||||
ARG APP_IMAGE
|
||||
ARG APP_NAME
|
||||
ARG APP_VERSION
|
||||
ARG APP_ROOT
|
||||
ARG APP_UID
|
||||
ARG APP_GID
|
||||
# :: default arguments
|
||||
ARG TARGETPLATFORM \
|
||||
TARGETOS \
|
||||
TARGETARCH \
|
||||
TARGETVARIANT \
|
||||
APP_IMAGE \
|
||||
APP_NAME \
|
||||
APP_VERSION \
|
||||
APP_ROOT \
|
||||
APP_UID \
|
||||
APP_GID \
|
||||
APP_NO_CACHE
|
||||
|
||||
# :: environment
|
||||
ENV APP_IMAGE=${APP_IMAGE}
|
||||
ENV APP_NAME=${APP_NAME}
|
||||
ENV APP_VERSION=${APP_VERSION}
|
||||
ENV APP_ROOT=${APP_ROOT}
|
||||
# :: default environment
|
||||
ENV APP_IMAGE=${APP_IMAGE} \
|
||||
APP_NAME=${APP_NAME} \
|
||||
APP_VERSION=${APP_VERSION} \
|
||||
APP_ROOT=${APP_ROOT}
|
||||
|
||||
# :: multi-stage
|
||||
COPY --from=distroless --chown=${APP_UID}:${APP_GID} / /
|
||||
COPY --from=distroless-fs --chown=${APP_UID}:${APP_GID} / /
|
||||
COPY --from=distroless-curl --chown=${APP_UID}:${APP_GID} / /
|
||||
COPY --from=distroless-nginx --chown=${APP_UID}:${APP_GID} / /
|
||||
COPY --from=distroless / /
|
||||
COPY --from=distroless-curl / /
|
||||
COPY --from=build /distroless/ /
|
||||
COPY --from=file-system --chown=${APP_UID}:${APP_GID} /distroless/ /
|
||||
|
||||
# :: Volumes
|
||||
VOLUME ["${APP_ROOT}/etc", "${APP_ROOT}/var"]
|
||||
|
||||
# :: Monitor
|
||||
HEALTHCHECK --interval=5s --timeout=2s CMD ["/usr/local/bin/curl", "-kILs", "--fail", "http://localhost:3000/ping"]
|
||||
HEALTHCHECK --interval=5s --timeout=2s --start-interval=5s \
|
||||
CMD ["/usr/local/bin/curl", "-kILs", "--fail", "http://localhost:3000/ping"]
|
||||
|
||||
# :: Start
|
||||
USER ${APP_UID}:${APP_GID}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
name: "nginx"
|
||||
services:
|
||||
nginx:
|
||||
image: "11notes/nginx:1.26.3"
|
||||
image: "11notes/nginx:1.28.0"
|
||||
read_only: true
|
||||
environment:
|
||||
TZ: "Europe/Zurich"
|
||||
|
192
key.txt
Normal file
192
key.txt
Normal file
@@ -0,0 +1,192 @@
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mQINBGZXLBYBEACxv3nUIdUtFCpH1G4hBB+eVSsWwnHVTDtSYfINHmN8dQfyGy22
|
||||
XcX2DR6ZW9/I5e06McAz4e3hTuhD5+sF7zv4Dd/xEqxpra08liVvB3QlJ6kawBJa
|
||||
Bn29s/N/A06yUrOVC1ZjhpDLshaHeyHjWDVLUX9ibLx1N3BQoeoH/5lgTmfF4JPk
|
||||
LfnTMwHWQ5phT52MVE+B/XExldIPAn27m2ZfXHXnSUMKCRybQNypBiIp6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6rEAixTuFc3B8xDmWDHKIjmdRMTN
|
||||
mm2KGz0CG7VjdHSe3oOBYok4fDVS0o636EOxndOHszuB9cfhMMXNDFi4T1xcZCLm
|
||||
UTdXCH88cagwTf6REsbfuXF8WiFemNNiPzMzLmnTlUe7Va2t+gKD/Q9vSlDLKz66
|
||||
IZBMdDoAHDKHZTtvwlAKswnpO0cDIeZjO0C1+YFLLSJ1nYQbh6mH+hJvNLimWPKR
|
||||
ZQCPAa5w0Gutz91cE9nv03yg3FMcjlEgklQ77g/nGGFJnQHAeMhfgUUfPLx1rI9/
|
||||
5NON5w7Wf3PXOlTYWO25ieUVKESu8dUCFktKRMnzauej2vjnQlMFG0upzw8dhytn
|
||||
E83WanvRzVynanK38PCNYQ3INsydN3wvJNetHpBdpyPfOa61dOUtu1TBvV80qcBR
|
||||
wIe6vbWZx0WB59b3KV8Sc68j8OJxF6i3E0IRby4f0hcoqogBkry0NPK/rtL2HHnN
|
||||
vcV0wl+DODz9hw==
|
||||
=oWlI
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mQENBE5OMmIBCAD+FPYKGriGGf7NqwKfWC83cBV01gabgVWQmZbMcFzeW+hMsgxH
|
||||
W6iimD0RsfZ9oEbfJCPG0CRSZ7ppq5pKamYs2+EJ8Q2ysOFHHwpGrA2C8zyNAs4I
|
||||
QxnZZIbETgcSwFtDun0XiqPwPZgyuXVm9PAbLZRbfBzm8wR/3SWygqZBBLdQk5TE
|
||||
fDR+Eny/M1RVR4xClECONF9UBB2ejFdI1LD45APbP2hsN/piFByU1t7yK2gpFyRt
|
||||
97WzGHn9MV5/TL7AmRPM4pcr3JacmtCnxXeCZ8nLqedoSuHFuhwyDnlAbu8I16O5
|
||||
XRrfzhrHRJFM1JnIiGmzZi6zBvH0ItfyX6ttABEBAAG0KW5naW54IHNpZ25pbmcg
|
||||
a2V5IDxzaWduaW5nLWtleUBuZ2lueC5jb20+iQE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stzoYzTktb4o1KL/vGj/onUIk8mFKx8p1X9VPWW0+8LqnAYf
|
||||
Ui3jDoXE/9avsF6ipS7y1k8ga81z01NOvuhai3c9pvMAIYrNTvoQVz8vTIOtJac1
|
||||
PEoU6jdm8blCt2UjGp8A4okBswQQAQgAHRYhBBPIKmO2A1dhVuMKTqDqmBtmsNln
|
||||
BQJmV1HrAAoJEKDqmBtmsNlntoEMANBPdskGMrU4ZxHMlOTd1JX74ucp5jez0Y2o
|
||||
bwlxOiWroraYVBnWT9v150kNf1Tb5mDxi820qebiSPZxhlI1Kj7NrPFNxQkhhNzN
|
||||
7Xr/M9OGpkwxosEpcMAiWfofyAdrnwos+MA/edu/EoyVRs6zpo75nP9GKUZwVcjH
|
||||
KtvPMojkZYpxjxsio0aK8LW8VwDtsbwPIXDIHzE7sxUvThrMdXumrh7gKqaC6gep
|
||||
HZB2lL5ES0kVE3/yjZR1khmcmF1zELeC0IddJjX2R9HMcSLixdJ2V8/VFsWMb2KQ
|
||||
pGtDzCuRyyxbugzBIxiGV2Xb7XwOByaikc1duqFv3gtk7Vk8wgQN3YwLkZ6pztlK
|
||||
vCbqy2b2wlPviGjApQ2GVd6EEmlCk2gKPkjrn2lxS2BXWorM+ANSswJT+eILi9yW
|
||||
Q5zzmYK2vFTzL7FAMeqS/671jNhZQ8O7jvbY/mRhl66k2MY7/JgI+coP0cY+HHr2
|
||||
ozw9yNdOZmnk2Prj7+mBuchbT3BJOQ==
|
||||
=AgHy
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mQINBGZXO1wBEADEm061e/MGo2f7rpSqokI59in/egWbeQE26vwxB7vPu4e7j+cU
|
||||
Vg3AezwCbf3nVRAE9DpJ+yuB0KVkM/0QszjOEEBuehZYJrUiwMyiY6jAk8xtqjpV
|
||||
PsOMyZrypoJhwzg/sYNadUPw4UoHJ/xq4wNA2ZG9Xf0l8M3shYJPmKWLz/eefa5V
|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KTqDqmBtmsNlnBQJmV1HlAAoJEKDq
|
||||
mBtmsNlnhI4L/0MHtfCZ2nuKTF/BkxJ7oB3Uule0tWiFj5SU97GjcVj1LgawGY7Y
|
||||
+zoyEd6Twpl6H/+QkZBB55Bf8+cTzRbDzH1Og0fSORu0pGC0uxWdYu1sTLeTnn93
|
||||
mesXAvevHFNbsPchIWwsVJopTdzMWuAQS5hMMMtNb/14ZfnBadzhjvaJeH3DlZVK
|
||||
0cGFp0qfbMfjr9yRJzQ1IkiXsS4G4uKg9T+KRsPr4+JalurWJgLnBXZGetNNjjUa
|
||||
UCV1KZY/iWCAlZjkZ5z7yBRj5nUWLb5AVouEQPEDbn+i/0uEjukC+G6EMq2mgbrh
|
||||
m0bFHbHAYBaf9EH0eP799HpoAx2aziDB5igAC516i3BnqxINI9mXHh92tU/H797I
|
||||
oYZvpBsAHDWDHj6O74jwk5lXF5Qwri8gjA8aTudmuQX3uX4h0/FyGGQJW4/wWecH
|
||||
/1fMuvHHyRtOSsJsheDwcSjrw5WlsyNjvSIbBPV2fIx60W2haVMUVX6CrxAeq44F
|
||||
UYda9m8fOnaIew==
|
||||
=TEOn
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
24
project.md
24
project.md
@@ -1,16 +1,22 @@
|
||||
${{ content_synopsis }} This image will serve as a base for nginx related images that need a high-performance webserver. The default tag of this image is stripped for most functions that can be used by a reverse proxy in front of nginx, it adds however important webserver functions like brotli compression. The default tag is not meant to run as a reverse proxy, use the full image for that. The default tag does not support HTTPS for instance!
|
||||
${{ content_synopsis }} This image will serve as a base for nginx related images that need a high-performance webserver. The default tag of this image is stripped for most functions that can be used by a reverse proxy in front of nginx, it adds however important webserver functions like brotli compression. The default tag is not meant to run as a reverse proxy, use the full image for that. **The default tag does not support HTTPS for instance!**
|
||||
|
||||
${{ content_uvp }} Good question! All the other images on the market that do exactly the same don’t do or offer these options:
|
||||
${{ content_uvp }} Good question! Because ...
|
||||
|
||||
${{ github:> [!IMPORTANT] }}
|
||||
${{ github:> }}* This image runs as 1000:1000 by default, most other images run everything as root
|
||||
${{ github:> }}* This image has no shell since it is 100% distroless, most other images run on a distro like Debian or Alpine with full shell access (security)
|
||||
${{ github:> }}* This image does not ship with any critical or high rated CVE and is automatically maintained via CI/CD, most other images mostly have no CVE scanning or code quality tools in place
|
||||
${{ github:> }}* This image is created via a secure, pinned CI/CD process and immune to upstream attacks, most other images have upstream dependencies that can be exploited
|
||||
${{ github:> }}* This image contains a proper health check that verifies the app is actually working, most other images have either no health check or only check if a port is open or ping works
|
||||
${{ github:> }}* This image works as read-only, most other images need to write files to the image filesystem
|
||||
${{ github:> }}* ... this image runs [rootless](https://github.com/11notes/RTFM/blob/main/linux/container/image/rootless.md) as 1000:1000
|
||||
${{ github:> }}* ... this image has no shell since it is [distroless](https://github.com/11notes/RTFM/blob/main/linux/container/image/distroless.md)
|
||||
${{ github:> }}* ... this image is auto updated to the latest version via CI/CD
|
||||
${{ github:> }}* ... this image has a health check
|
||||
${{ github:> }}* ... this image runs read-only
|
||||
${{ github:> }}* ... this image is automatically scanned for CVEs before and after publishing
|
||||
${{ github:> }}* ... this image is created via a secure and pinned CI/CD process
|
||||
${{ github:> }}* ... this image verifies external payloads if possible
|
||||
${{ github:> }}* ... this image is very small
|
||||
|
||||
If you value security, simplicity and optimizations to the extreme, then this image might be for you.
|
||||
|
||||
${{ content_comparison }}
|
||||
|
||||
If you value security, simplicity and the ability to interact with the maintainer and developer of an image. Using my images is a great start in that direction.
|
||||
|
||||
${{ title_config }}
|
||||
```yaml
|
||||
|
Reference in New Issue
Block a user