mirror of
https://github.com/frappe/frappe_docker.git
synced 2026-06-17 13:55:08 +00:00
docs: require Docker Engine v23+ instead of setting DOCKER_BUILDKIT=1
BuildKit has been the default builder since Docker Engine 23.0 (Feb 2023), so prefixing the example build commands with DOCKER_BUILDKIT=1 is redundant on any supported install. Replace the prefix with an explicit prerequisite note so the requirement lives with the user's environment, not the example. The build relies on BuildKit secret mounts (--secret) to keep apps.json tokens out of image layers, which is why a real BuildKit-default engine is mandatory rather than merely recommended. Addresses review feedback on PR #1861.
This commit is contained in:
parent
ae275df161
commit
8892908f5d
2 changed files with 8 additions and 6 deletions
|
|
@ -7,11 +7,13 @@ This guide walks you through building Frappe images from the repository resource
|
|||
# Prerequisites
|
||||
|
||||
- git
|
||||
- docker or podman
|
||||
- docker (Engine **v23.0+**) or podman
|
||||
- docker compose v2 or podman compose
|
||||
|
||||
> Install containerization software according to the official maintainer documentation. Avoid package managers when not recommended, as they frequently cause compatibility issues.
|
||||
|
||||
> **Why Docker Engine v23+?** The build uses [BuildKit secrets](https://docs.docker.com/build/building/secrets/) (`--secret`) to keep `apps.json` tokens out of image layers. BuildKit is the default builder starting with Docker Engine 23.0 — older releases will fail or silently fall back to the legacy builder, which does not support secret mounts.
|
||||
|
||||
# Clone this repo
|
||||
|
||||
```bash
|
||||
|
|
@ -46,12 +48,12 @@ To include custom apps in your image, create an `apps.json` file in the reposito
|
|||
|
||||
Choose the appropriate build command based on your container runtime and desired image type. This example builds the `layered` image with the custom `apps.json` you created.
|
||||
|
||||
> **Security note:** The `apps.json` file is passed as a [BuildKit secret](https://docs.docker.com/build/building/secrets/) so that private repository tokens are **never** stored in image layer metadata. Do not use `--build-arg` for `apps.json` — build arguments are permanently visible via `docker image history`.
|
||||
> **Security note:** The `apps.json` file is passed as a [BuildKit secret](https://docs.docker.com/build/building/secrets/) so that private repository tokens are **never** stored in image layer metadata. Do not use `--build-arg` for `apps.json` — build arguments are permanently visible via `docker image history`. This requires **Docker Engine v23.0+** (where BuildKit is the default builder).
|
||||
|
||||
`Docker`:
|
||||
|
||||
```bash
|
||||
DOCKER_BUILDKIT=1 docker build \
|
||||
docker build \
|
||||
--build-arg=FRAPPE_PATH=https://github.com/frappe/frappe \
|
||||
--build-arg=FRAPPE_BRANCH=version-15 \
|
||||
--secret=id=apps_json,src=apps.json \
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ We will setup the following:
|
|||
|
||||
## Requirements
|
||||
|
||||
- A server that can run Docker (recommended: 2 vCPU, 4 GB RAM, 50 GB SSD).
|
||||
- A server that can run Docker Engine **v23.0+** (recommended: 2 vCPU, 4 GB RAM, 50 GB SSD). The custom-image build below uses [BuildKit secrets](https://docs.docker.com/build/building/secrets/), which require BuildKit as the default builder (Docker Engine 23.0+).
|
||||
- A public domain with DNS control.
|
||||
- Two subdomains pointing to your server IP (A/AAAA records):
|
||||
- `erp.your-domain.com`
|
||||
|
|
@ -84,10 +84,10 @@ cat > ~/gitops/apps.json <<'EOF'
|
|||
EOF
|
||||
```
|
||||
|
||||
Build the image, passing `apps.json` as a [BuildKit secret](https://docs.docker.com/build/building/secrets/) so that private repo tokens are never stored in image layers:
|
||||
Build the image, passing `apps.json` as a [BuildKit secret](https://docs.docker.com/build/building/secrets/) so that private repo tokens are never stored in image layers. This requires **Docker Engine v23.0+**, where BuildKit is the default builder:
|
||||
|
||||
```shell
|
||||
DOCKER_BUILDKIT=1 docker build \
|
||||
docker build \
|
||||
--build-arg=FRAPPE_PATH=https://github.com/frappe/frappe \
|
||||
--build-arg=FRAPPE_BRANCH=version-16 \
|
||||
--secret=id=apps_json,src=$HOME/gitops/apps.json \
|
||||
|
|
|
|||
Loading…
Reference in a new issue