Skip to content

Commit

Permalink
Add missing container commands
Browse files Browse the repository at this point in the history
(cherry picked from commit 02739d2)
  • Loading branch information
nvollmar authored and c-po committed May 16, 2024
1 parent 67f126d commit aa63e6f
Showing 1 changed file with 45 additions and 13 deletions.
58 changes: 45 additions & 13 deletions docs/configuration/container/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,34 @@ Configuration
If a registry is not specified, Docker.io will be used as the container
registry unless an alternative registry is specified using
**set container registry <name>** or the registry is included in the image name
**set container registry <name>** or the registry is included
in the image name

.. code-block:: none
set container name mysql-server image quay.io/mysql:8.0
.. cfgcmd:: set container name <name> entrypoint <entrypoint>

Override the default entrypoint from the image for a container.

.. cfgcmd:: set container name <name> command <command>

Override the default command from the image for a container.

.. cfgcmd:: set container name <name> arguments <arguments>

Set the command arguments for a container.

.. cfgcmd:: set container name <name> uid <userid>
.. cfgcmd:: set container name <name> gid <groupid>

Set user ID and/or group ID a container will run as.

.. cfgcmd:: set container name <name> host-name <hostname>

Set the host name for a container.

.. cfgcmd:: set container name <name> allow-host-networks

Allow host networking in a container. The network stack of the container is
Expand All @@ -47,7 +69,8 @@ Configuration
Optionally set a specific static IPv4 or IPv6 address for the container.
This address must be within the named network prefix.

.. note:: The first IP in the container network is reserved by the engine and cannot be used
.. note:: The first IP in the container network is reserved by the
engine and cannot be used

.. cfgcmd:: set container name <name> description <text>

Expand Down Expand Up @@ -103,8 +126,10 @@ Configuration
Set the restart behavior of the container.

- **no**: Do not restart containers on exit
- **on-failure**: Restart containers when they exit with a non-zero exit code, retrying indefinitely (default)
- **always**: Restart containers when they exit, regardless of status, retrying indefinitely
- **on-failure**: Restart containers when they exit with a non-zero
exit code, retrying indefinitely (default)
- **always**: Restart containers when they exit, regardless of status,
retrying indefinitely

.. cfgcmd:: set container name <name> memory <MB>

Expand All @@ -122,12 +147,18 @@ Configuration
Set container capabilities or permissions.

- **net-admin**: Network operations (interface, firewall, routing tables)
- **net-bind-service**: Bind a socket to privileged ports (port numbers less than 1024)
- **net-bind-service**: Bind a socket to privileged ports
(port numbers less than 1024)
- **net-raw**: Permission to create raw network sockets
- **setpcap**: Capability sets (from bounded or inherited set)
- **sys-admin**: Administation operations (quotactl, mount, sethostname, setdomainame)
- **sys-admin**: Administration operations (quotactl, mount, sethostname,
setdomainame)
- **sys-time**: Permission to set system clock

.. cfgcmd:: set container name <name> label <label> value <value>

Add metadata label for this container.

.. cfgcmd:: set container name <name> disable

Disable a container.
Expand Down Expand Up @@ -216,27 +247,28 @@ Example Configuration
*********************

For the sake of demonstration, `example #1 in the official documentation
<https://www.zabbix.com/documentation/current/manual/installation/containers>`_
<https://www.zabbix.com/documentation/current/manual/
installation/containers>`_
to the declarative VyOS CLI syntax.

.. code-block:: none
set container network zabbix-net prefix 172.20.0.0/16
set container network zabbix-net description 'Network for Zabbix component containers'
set container network zabbix prefix 172.20.0.0/16
set container network zabbix description 'Network for Zabbix component containers'
set container name mysql-server image mysql:8.0
set container name mysql-server network zabbix-net
set container name mysql-server network zabbix
set container name mysql-server environment 'MYSQL_DATABASE' value 'zabbix'
set container name mysql-server environment 'MYSQL_USER' value 'zabbix'
set container name mysql-server environment 'MYSQL_PASSWORD' value 'zabbix_pwd'
set container name mysql-server environment 'MYSQL_ROOT_PASSWORD' value 'root_pwd'
set container name zabbix-java-gateway image zabbix/zabbix-java-gateway:alpine-5.2-latest
set container name zabbix-java-gateway network zabbix-net
set container name zabbix-java-gateway network zabbix
set container name zabbix-server-mysql image zabbix/zabbix-server-mysql:alpine-5.2-latest
set container name zabbix-server-mysql network zabbix-net
set container name zabbix-server-mysql network zabbix
set container name zabbix-server-mysql environment 'DB_SERVER_HOST' value 'mysql-server'
set container name zabbix-server-mysql environment 'MYSQL_DATABASE' value 'zabbix'
Expand All @@ -249,7 +281,7 @@ Example Configuration
set container name zabbix-server-mysql port zabbix destination 10051
set container name zabbix-web-nginx-mysql image zabbix/zabbix-web-nginx-mysql:alpine-5.2-latest
set container name zabbix-web-nginx-mysql network zabbix-net
set container name zabbix-web-nginx-mysql network zabbix
set container name zabbix-web-nginx-mysql environment 'MYSQL_DATABASE' value 'zabbix'
set container name zabbix-web-nginx-mysql environment 'ZBX_SERVER_HOST' value 'zabbix-server-mysql'
Expand Down

0 comments on commit aa63e6f

Please sign in to comment.