env

env <NAME> {value <VALUE>}|{encrypted [plaintext <VALUE>|ciphertext <VALUE>]}

no env <NAME> {value <VALUE>}|{encrypted {plaintext|ciphertext}<VALUE>}

Description

Configures an environment variable for a container that is composed of a key and a value pair. The key-value pair defines the behavior of the environment in a container and is used by the container processes. The value of the environment variable can be stored in the host system as an encrypted value. The container manager infrastructure provides the decrypted value to the container.

The no form of this command removes the configured environment variable from a container.

Configuring the env variable for an already operational container causes the container to restart.

Parameter

Description

<NAME>

Specifies the name of the container environment variables.

value <VALUE>

Specifies the variable value.

encrypted

Encrypts the environment variable value. If you press <enter> after the encrypted parameter, you will enter a variable configuration mode that allows you to securely enter a hidden value. This is the recommended method for entering an encrypted variable

plaintext <VALUE>

Optional. Specifies the variable value in plain text. Not recommended for encrypted variables.

ciphertext <VALUE>

Optional. Specifies the variable value as previously encrypted text. Recommended for encrypted variables; specify the encrypted variable value as previously encrypted text.

Example

Securely entering an encrypted variable:

6300(config-container-test)# env TEST encrypted

Enter environment variable value: ********

6300(config-container-test)# end

Command History

Release

Modification

10.13.1000

The plaintext and ciphertext options for the encrypted parameter are now optional. Starting with this release, you can use the encrypted option to encrypt the environment variable and specify the value in plaintext hidden from the CLI.

10.12

Command introduced

Command Information

Platforms

Command context

Authority

8100

8320

8325

8360

8400

9300

9300S

10000

config-container-<CONTAINER-NAME>

Administrators or local user group members with execution rights for this command.