From 996ae3aeb7c11b7588f7185bb5cc998b6172bbe0 Mon Sep 17 00:00:00 2001 From: Jean-Yves <7360784+docjyJ@users.noreply.github.com> Date: Fri, 14 Mar 2025 09:57:01 +0100 Subject: [PATCH] Add container doc Signed-off-by: Jean-Yves <7360784+docjyJ@users.noreply.github.com> --- .../helloworld/container-definition.md | 68 +++++++++++++++++++ php/containers-schema.json | 4 +- 2 files changed, 70 insertions(+), 2 deletions(-) create mode 100644 community-containers/helloworld/container-definition.md diff --git a/community-containers/helloworld/container-definition.md b/community-containers/helloworld/container-definition.md new file mode 100644 index 00000000..56cd5c48 --- /dev/null +++ b/community-containers/helloworld/container-definition.md @@ -0,0 +1,68 @@ +# AIO Containers Definition Schema + +## Required Properties + +| Field | Description | +|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------| +| `image` | This is the image name of the container. You can use 2 repositories: GitHub Container Registry: `ghcr.io/user/repo` (preferred); Docker Hub: `user/repo`; | +| `container_name` | This is the name of the container. It must be unique and follow the pattern `nextcloud-aio-`. | +| `image_tag` | This is the tag of the image. We recommend using the `vX` tag corresponding to major versions of the image. | +| `display_name` | The name of the container to be displayed in the UI. | +| `documentation` | Link to the documentation of the container. | + +## Optional Properties + +| Field | Description | +|---------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `expose` | TODO | +| `cap_add` | See [Docker Capabilities](https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities) | +| `cap_drop` | See [Docker Capabilities](https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities) | +| `depends_on` | List containers should be started before starting this container. | +| `environment` | List of environment variables to be set in the container. See [Docker Environment Variables](https://docs.docker.com/engine/reference/run/#env-environment-variables) | +| `internal_port` | TODO | +| `stop_grace_period` | TODO | +| `user` | The user to run the container as. See [Docker User](https://docs.docker.com/engine/reference/run/#user) | +| `ports` | A list of ports to expose on the container. See [port section](#ports) | +| `healthcheck` | The healthcheck configuration for the container. See [healthcheck section](#healthcheck) | +| `aio_variables` | TODO | +| `restart` | The restart policy for the container. See [Docker Restart Policy](https://docs.docker.com/engine/reference/run/#restart-policies---restart) | +| `shm_size` | TODO | +| `secrets` | TODO | +| `ui_secret` | TODO | +| `devices` | TODO | +| `enable_nvidia_gpu` | TODO | +| `apparmor_unconfined` | TODO | +| `backup_volumes` | List of volumes should be included in the AIO backup. | +| `nextcloud_exec_commands` | TODO | +| `profiles` | TODO | +| `read_only` | TODO | +| `init` | TODO | +| `tmpfs` | TODO | +| `volumes` | List of volumes to mount in the container. See [volumes section](#volumes) | + +### Ports + +| Field | Description | +|---------------|-------------------------------------| +| `ip_binding` | The IP address to bind the port to. | +| `port_number` | The port number to expose. | +| `protocol` | The protocol to use. | + +### Healthcheck + +| Field | Description | +|------------------|------------------------------------------------------------------------------| +| `interval` | The time between running the healthcheck. | +| `timeout` | The time to wait for the healthcheck to complete. | +| `retries` | The number of retries to attempt before considering the container unhealthy. | +| `start_period` | The time to wait before starting the healthcheck. | +| `start_interval` | The time to wait between retries. | +| `test` | The command to run to check the health of the container. | + +### Volumes + +| Field | Description | +|---------------|------------------------------------------------| +| `destination` | The path to mount the volume in the container. | +| `source` | The source of the volume. | +| `writeable` | Whether the volume is writeable. | diff --git a/php/containers-schema.json b/php/containers-schema.json index 46782a33..205e81d2 100644 --- a/php/containers-schema.json +++ b/php/containers-schema.json @@ -9,13 +9,13 @@ "items": { "type": "object", "additionalProperties": false, - "minProperties": 2, + "minProperties": 3, "required": ["image", "container_name", "image_tag"], "properties": { "image": { "type": "string", "minLength": 1, - "pattern": "^(ghcr.io/)?[a-z0-9/-]+$" + "pattern": "^(ghcr.io/)?[a-z0-9_-]+/[a-z0-9_-]+$" }, "expose": { "type": "array",