mirror of
https://github.com/frappe/frappe_docker.git
synced 2024-09-19 18:49:01 +00:00
Improve custom apps documentation (#1374)
This commit is contained in:
parent
1bc075401f
commit
3ec36e2e57
@ -43,11 +43,7 @@ Note:
|
|||||||
### Build Image
|
### Build Image
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
buildah build \
|
docker build \
|
||||||
--build-arg=FRAPPE_PATH=https://github.com/frappe/frappe \
|
|
||||||
--build-arg=FRAPPE_BRANCH=version-15 \
|
|
||||||
--build-arg=PYTHON_VERSION=3.11.6 \
|
|
||||||
--build-arg=NODE_VERSION=18.18.2 \
|
|
||||||
--build-arg=APPS_JSON_BASE64=$APPS_JSON_BASE64 \
|
--build-arg=APPS_JSON_BASE64=$APPS_JSON_BASE64 \
|
||||||
--tag=ghcr.io/user/repo/custom:1.0.0 \
|
--tag=ghcr.io/user/repo/custom:1.0.0 \
|
||||||
--file=images/custom/Containerfile .
|
--file=images/custom/Containerfile .
|
||||||
@ -55,13 +51,24 @@ buildah build \
|
|||||||
|
|
||||||
Note:
|
Note:
|
||||||
|
|
||||||
- Use `docker` instead of `buildah` as per your setup.
|
- Use `buildah` instead of `docker` as per your setup.
|
||||||
- `FRAPPE_PATH` and `FRAPPE_BRANCH` build args are optional and can be overridden in case of fork/branch or test a PR.
|
|
||||||
- Make sure `APPS_JSON_BASE64` variable has correct base64 encoded JSON string. It is consumed as build arg, base64 encoding ensures it to be friendly with environment variables. Use `jq empty apps.json` to validate `apps.json` file.
|
- Make sure `APPS_JSON_BASE64` variable has correct base64 encoded JSON string. It is consumed as build arg, base64 encoding ensures it to be friendly with environment variables. Use `jq empty apps.json` to validate `apps.json` file.
|
||||||
- Make sure the `--tag` is valid image name that will be pushed to registry. See section [below](#use-images) for remarks about its use.
|
- Make sure the `--tag` is valid image name that will be pushed to registry. See section [below](#use-images) for remarks about its use.
|
||||||
- Change `--build-arg` as per version of Python, NodeJS, Frappe Framework repo and branch
|
|
||||||
- `.git` directories for all apps are removed from the image.
|
- `.git` directories for all apps are removed from the image.
|
||||||
|
|
||||||
|
Customize these optional `--build-arg`s to use a different Frappe Framework repo and branch, or version of Python and NodeJS:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker build \
|
||||||
|
--build-arg=FRAPPE_PATH=https://github.com/frappe/frappe \
|
||||||
|
--build-arg=FRAPPE_BRANCH=version-15 \
|
||||||
|
--build-arg=PYTHON_VERSION=3.11.9 \
|
||||||
|
--build-arg=NODE_VERSION=18.20.2 \
|
||||||
|
--build-arg=APPS_JSON_BASE64=$APPS_JSON_BASE64 \
|
||||||
|
--tag=ghcr.io/user/repo/custom:1.0.0 \
|
||||||
|
--file=images/custom/Containerfile .
|
||||||
|
```
|
||||||
|
|
||||||
### Push image to use in yaml files
|
### Push image to use in yaml files
|
||||||
|
|
||||||
Login to `docker` or `buildah`
|
Login to `docker` or `buildah`
|
||||||
@ -87,10 +94,6 @@ podman run --rm -it \
|
|||||||
gcr.io/kaniko-project/executor:latest \
|
gcr.io/kaniko-project/executor:latest \
|
||||||
--dockerfile=images/custom/Containerfile \
|
--dockerfile=images/custom/Containerfile \
|
||||||
--context=git://github.com/frappe/frappe_docker \
|
--context=git://github.com/frappe/frappe_docker \
|
||||||
--build-arg=FRAPPE_PATH=https://github.com/frappe/frappe \
|
|
||||||
--build-arg=FRAPPE_BRANCH=version-14 \
|
|
||||||
--build-arg=PYTHON_VERSION=3.10.12 \
|
|
||||||
--build-arg=NODE_VERSION=16.20.1 \
|
|
||||||
--build-arg=APPS_JSON_BASE64=$APPS_JSON_BASE64 \
|
--build-arg=APPS_JSON_BASE64=$APPS_JSON_BASE64 \
|
||||||
--cache=true \
|
--cache=true \
|
||||||
--destination=ghcr.io/user/repo/custom:1.0.0 \
|
--destination=ghcr.io/user/repo/custom:1.0.0 \
|
||||||
|
Loading…
Reference in New Issue
Block a user