diff --git a/README.md b/README.md index c8c1c95..c0d3f42 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,8 @@ - [docker](./containers/docker/README.md) - `ghcr.io/expnt/containers/docker` - [minio](./containers/minio/README.md) - `ghcr.io/expnt/containers/minio` -- [python](./containers/python/README.md) - `ghcr.io/expnt/containers/xep-python-iac` +- [node](./containers/node/README.md) - `ghcr.io/expnt/containers/node` +- [xep-python-iac](./containers/xep-python-iac/README.md) - `ghcr.io/expnt/containers/xep-python-iac` - [redis](./containers/redis/README.md) - `ghcr.io/expnt/containers/redis` - [supabase](./containers/supabase/README.md) - `ghcr.io/expnt/containers/supabase` - [timescaledb](./containers/timescaledb/README.md) - `ghcr.io/expnt/containers/timescaledb` @@ -34,6 +35,7 @@ poetry run containers build supabase -o poetry run containers build minio -o poetry run containers build redis -o poetry run containers build python -o +poetry run containers build node -o # Build specific version only poetry run containers build docker -o --version 27 diff --git a/containers/docker/Earthfile b/containers/docker/Earthfile index eb30d1e..8304453 100644 --- a/containers/docker/Earthfile +++ b/containers/docker/Earthfile @@ -7,7 +7,7 @@ ARG --global GITHUB_REPOSITORY_OWNER docker-base: ARG BUILDX_VERSION=v0.20.1 - FROM docker.io/docker:${BASE_VERSION}-dind + FROM docker.io/docker:${BASE_VERSION} RUN apk add --no-cache \ parallel \ kubectl \ diff --git a/containers/docker/README.md b/containers/docker/README.md index 666baae..565c261 100644 --- a/containers/docker/README.md +++ b/containers/docker/README.md @@ -6,9 +6,9 @@ Aliased container image for Docker-in-Docker (dind) with buildx and additional t -| Tag | Base Version | -| ---- | ------------ | -| `27` | 27 | +| Tag | Base Version | +| --------- | ------------ | +| `27-dind` | 27-dind | diff --git a/containers/docker/versions.yaml b/containers/docker/versions.yaml index aacc46c..35fd495 100644 --- a/containers/docker/versions.yaml +++ b/containers/docker/versions.yaml @@ -1,9 +1,9 @@ image_name: docker tag_pattern: "{base_version}" versions: - - base_version: "27" + - base_version: "27-dind" watch: - - pattern: ^\d+$ + - pattern: ^\d+-dind$ source: docker.io/library/docker target: base_version type: docker diff --git a/containers/node/Earthfile b/containers/node/Earthfile new file mode 100644 index 0000000..69b6bfa --- /dev/null +++ b/containers/node/Earthfile @@ -0,0 +1,22 @@ +VERSION 0.8 +IMPORT .. AS common + +ARG --global BASE_VERSION +ARG --global TAG +ARG --global GITHUB_REPOSITORY_OWNER + +node-base: + FROM docker.io/library/node:${BASE_VERSION} + DO common+ADD_LABELS + +validate: + FROM +node-base + RUN --no-cache test -n "$BASE_VERSION" || (echo "BASE_VERSION is required" && exit 1) + +build: + BUILD +validate + FROM +node-base + DO common+SAVE_IMAGE --IMAGE_NAME=node --TAG=${TAG} --GITHUB_REPOSITORY_OWNER=${GITHUB_REPOSITORY_OWNER} + +build-multiplatform: + DO --pass-args common+BUILD_MULTIPLATFORM --TARGET=./node+build diff --git a/containers/node/README.md b/containers/node/README.md new file mode 100644 index 0000000..0539f11 --- /dev/null +++ b/containers/node/README.md @@ -0,0 +1,20 @@ +# node + +Aliased container image for Node.js. + +## Available Versions + + + +| Tag | Base Version | +| ----------- | ------------ | +| `22-alpine` | 22-alpine | +| `22-slim` | 22-slim | + + + +## Usage + +```bash +docker pull ghcr.io/expnt/containers/node: +``` diff --git a/containers/node/versions.yaml b/containers/node/versions.yaml new file mode 100644 index 0000000..a667fa5 --- /dev/null +++ b/containers/node/versions.yaml @@ -0,0 +1,14 @@ +image_name: node +tag_pattern: "{base_version}" +versions: + - base_version: "22-alpine" + - base_version: "22-slim" +watch: + - pattern: ^(\d+)-alpine$ + source: docker.io/library/node + target: base_version + type: docker + - pattern: ^(\d+)-slim$ + source: docker.io/library/node + target: base_version + type: docker diff --git a/containers/php/Earthfile b/containers/php/Earthfile new file mode 100644 index 0000000..fcecb0a --- /dev/null +++ b/containers/php/Earthfile @@ -0,0 +1,22 @@ +VERSION 0.8 +IMPORT .. AS common + +ARG --global BASE_VERSION +ARG --global TAG +ARG --global GITHUB_REPOSITORY_OWNER + +php-base: + FROM docker.io/library/php:${BASE_VERSION} + DO common+ADD_LABELS + +validate: + FROM +php-base + RUN --no-cache test -n "$BASE_VERSION" || (echo "BASE_VERSION is required" && exit 1) + +build: + BUILD +validate + FROM +php-base + DO common+SAVE_IMAGE --IMAGE_NAME=php --TAG=${TAG} --GITHUB_REPOSITORY_OWNER=${GITHUB_REPOSITORY_OWNER} + +build-multiplatform: + DO --pass-args common+BUILD_MULTIPLATFORM --TARGET=./php+build diff --git a/containers/php/README.md b/containers/php/README.md new file mode 100644 index 0000000..b8c963b --- /dev/null +++ b/containers/php/README.md @@ -0,0 +1,19 @@ +# php + +Aliased container image for PHP. + +## Available Versions + + + +| Tag | Base Version | +| ----------- | ------------ | +| `8.1-fpm` | 8.1-fpm | + + + +## Usage + +```bash +docker pull ghcr.io/expnt/containers/php: +``` diff --git a/containers/php/versions.yaml b/containers/php/versions.yaml new file mode 100644 index 0000000..89d7ffd --- /dev/null +++ b/containers/php/versions.yaml @@ -0,0 +1,9 @@ +image_name: php +tag_pattern: "{base_version}" +versions: + - base_version: "8.1-fpm" +watch: + - pattern: ^[\d.]+-fpm$ + source: docker.io/library/php + target: base_version + type: docker \ No newline at end of file diff --git a/containers/python/Earthfile b/containers/python/Earthfile index eec9891..9cc6fc5 100644 --- a/containers/python/Earthfile +++ b/containers/python/Earthfile @@ -4,13 +4,9 @@ IMPORT .. AS common ARG --global BASE_VERSION ARG --global TAG ARG --global GITHUB_REPOSITORY_OWNER -ARG --global POETRY_VERSION -ARG --global PRECOMMIT_VERSION -ARG --global OPENTOFU_VERSION -ARG --global TFLINT_VERSION python-base: - FROM python:${BASE_VERSION}-bookworm + FROM docker.io/library/python:${BASE_VERSION} DO common+ADD_LABELS validate: @@ -20,38 +16,7 @@ validate: build: BUILD +validate FROM +python-base - USER root - - RUN set -eux && \ - apt-get update && \ - apt-get install -y --no-install-recommends \ - curl \ - ca-certificates \ - gnupg \ - lsb-release \ - unzip && \ - apt-get install -y --no-install-recommends pipx && \ - pipx install poetry==${POETRY_VERSION} && \ - pipx install pre-commit==${PRECOMMIT_VERSION} && \ - ARCH=$(dpkg --print-architecture) && \ - curl --http1.1 -fsSL -o /tmp/opentofu.deb \ - https://github.com/opentofu/opentofu/releases/download/v${OPENTOFU_VERSION}/tofu_${OPENTOFU_VERSION}_${ARCH}.deb && \ - dpkg -i /tmp/opentofu.deb && \ - curl --http1.1 -fsSL -o /tmp/tflint.zip \ - https://github.com/terraform-linters/tflint/releases/download/v${TFLINT_VERSION}/tflint_linux_${ARCH}.zip && \ - unzip /tmp/tflint.zip -d /usr/local/bin && \ - chmod +x /usr/local/bin/tflint && \ - apt-get purge -y curl gnupg lsb-release unzip && \ - apt-get clean && \ - apt-get autoremove -y && \ - rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /var/cache/apt/* \ - /usr/share/doc/* /usr/share/man/* /usr/share/info/* \ - /usr/share/i18n/locales/* /usr/share/locale/* && \ - (find /usr/share/i18n -type f ! -name "POSIX" -delete || true) - - ENV PATH="/root/.local/bin:$PATH" - - DO common+SAVE_IMAGE --IMAGE_NAME=xep-python-iac --TAG=${TAG} --GITHUB_REPOSITORY_OWNER=${GITHUB_REPOSITORY_OWNER} + DO common+SAVE_IMAGE --IMAGE_NAME=python --TAG=${TAG} --GITHUB_REPOSITORY_OWNER=${GITHUB_REPOSITORY_OWNER} build-multiplatform: - DO --pass-args common+BUILD_MULTIPLATFORM --TARGET=./python+build + DO --pass-args common+BUILD_MULTIPLATFORM --TARGET=./python+build \ No newline at end of file diff --git a/containers/python/README.md b/containers/python/README.md index 58bfb4a..0f7e24a 100644 --- a/containers/python/README.md +++ b/containers/python/README.md @@ -1,19 +1,20 @@ # python -Python container with IAC tooling (Poetry, pre-commit, OpenTofu, TFLint). +Aliased container image for Python. ## Available Versions -| Tag | Base Version | -| --------------- | ------------ | -| `3.12-bookworm` | 3.12 | +| Tag | Base Version | +| -------------------- | ------------------ | +| `3.12` | 3.12 | +| `3.13-slim-bullseye` | 3.13-slim-bullseye | ## Usage ```bash -docker pull ghcr.io/expnt/containers/xep-python-iac: +docker pull ghcr.io/expnt/containers/python: ``` diff --git a/containers/python/versions.yaml b/containers/python/versions.yaml index 4211955..32912a8 100644 --- a/containers/python/versions.yaml +++ b/containers/python/versions.yaml @@ -1,29 +1,14 @@ -image_name: xep-python-iac -tag_pattern: "{base_version}-bookworm" +image_name: python +tag_pattern: "{base_version}" versions: - base_version: "3.12" - opentofu_version: 1.8.8 - poetry_version: 1.8.5 - precommit_version: 4.0.1 - tflint_version: 0.54.0 + - base_version: "3.13-slim-bullseye" watch: - - pattern: ^3\.(1[2-9]|[2-9]\d)-bookworm$ + - pattern: ^\d+\.\d+$ + source: docker.io/library/python + target: base_version + type: docker + - pattern: ^\d+\.\d+-slim-bullseye$ source: docker.io/library/python target: base_version type: docker - - pattern: ^\d+\.\d+\.\d+$ - source: python-poetry/poetry - target: poetry_version - type: github - - pattern: ^v\d+\.\d+\.\d+$ - source: pre-commit/pre-commit - target: precommit_version - type: github - - pattern: ^v\d+\.\d+\.\d+$ - source: opentofu/opentofu - target: opentofu_version - type: github - - pattern: ^v\d+\.\d+\.\d+$ - source: terraform-linters/tflint - target: tflint_version - type: github diff --git a/containers/xep-python-iac/Earthfile b/containers/xep-python-iac/Earthfile new file mode 100644 index 0000000..70dab53 --- /dev/null +++ b/containers/xep-python-iac/Earthfile @@ -0,0 +1,57 @@ +VERSION 0.8 +IMPORT .. AS common + +ARG --global BASE_VERSION +ARG --global TAG +ARG --global GITHUB_REPOSITORY_OWNER +ARG --global POETRY_VERSION +ARG --global PRECOMMIT_VERSION +ARG --global OPENTOFU_VERSION +ARG --global TFLINT_VERSION + +python-base: + FROM python:${BASE_VERSION}-bookworm + DO common+ADD_LABELS + +validate: + FROM +python-base + RUN --no-cache test -n "$BASE_VERSION" || (echo "BASE_VERSION is required" && exit 1) + +build: + BUILD +validate + FROM +python-base + USER root + + RUN set -eux && \ + apt-get update && \ + apt-get install -y --no-install-recommends \ + curl \ + ca-certificates \ + gnupg \ + lsb-release \ + unzip && \ + apt-get install -y --no-install-recommends pipx && \ + pipx install poetry==${POETRY_VERSION} && \ + pipx install pre-commit==${PRECOMMIT_VERSION} && \ + ARCH=$(dpkg --print-architecture) && \ + curl --http1.1 -fsSL -o /tmp/opentofu.deb \ + https://github.com/opentofu/opentofu/releases/download/v${OPENTOFU_VERSION}/tofu_${OPENTOFU_VERSION}_${ARCH}.deb && \ + dpkg -i /tmp/opentofu.deb && \ + curl --http1.1 -fsSL -o /tmp/tflint.zip \ + https://github.com/terraform-linters/tflint/releases/download/v${TFLINT_VERSION}/tflint_linux_${ARCH}.zip && \ + unzip /tmp/tflint.zip -d /usr/local/bin && \ + chmod +x /usr/local/bin/tflint && \ + apt-get purge -y curl gnupg lsb-release unzip && \ + apt-get clean && \ + apt-get autoremove -y && \ + rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /var/cache/apt/* \ + /usr/share/doc/* /usr/share/man/* /usr/share/info/* \ + /usr/share/i18n/locales/* /usr/share/locale/* && \ + (find /usr/share/i18n -type f ! -name "POSIX" -delete || true) + + ENV PATH="/root/.local/bin:$PATH" + + DO common+SAVE_IMAGE --IMAGE_NAME=xep-python-iac --TAG=${TAG} --GITHUB_REPOSITORY_OWNER=${GITHUB_REPOSITORY_OWNER} + +build-multiplatform: + DO --pass-args common+BUILD_MULTIPLATFORM --TARGET=./xep-python-iac+build diff --git a/containers/xep-python-iac/README.md b/containers/xep-python-iac/README.md new file mode 100644 index 0000000..31af977 --- /dev/null +++ b/containers/xep-python-iac/README.md @@ -0,0 +1,19 @@ +# XEP-Python-IaC + +Python container with IAC tooling (Poetry, pre-commit, OpenTofu, TFLint). + +## Available Versions + + + +| Tag | Base Version | +| --------------- | ------------ | +| `3.12-bookworm` | 3.12 | + + + +## Usage + +```bash +docker pull ghcr.io/expnt/containers/xep-python-iac: +``` diff --git a/containers/xep-python-iac/versions.yaml b/containers/xep-python-iac/versions.yaml new file mode 100644 index 0000000..4211955 --- /dev/null +++ b/containers/xep-python-iac/versions.yaml @@ -0,0 +1,29 @@ +image_name: xep-python-iac +tag_pattern: "{base_version}-bookworm" +versions: + - base_version: "3.12" + opentofu_version: 1.8.8 + poetry_version: 1.8.5 + precommit_version: 4.0.1 + tflint_version: 0.54.0 +watch: + - pattern: ^3\.(1[2-9]|[2-9]\d)-bookworm$ + source: docker.io/library/python + target: base_version + type: docker + - pattern: ^\d+\.\d+\.\d+$ + source: python-poetry/poetry + target: poetry_version + type: github + - pattern: ^v\d+\.\d+\.\d+$ + source: pre-commit/pre-commit + target: precommit_version + type: github + - pattern: ^v\d+\.\d+\.\d+$ + source: opentofu/opentofu + target: opentofu_version + type: github + - pattern: ^v\d+\.\d+\.\d+$ + source: terraform-linters/tflint + target: tflint_version + type: github