Environment
Primer
Truthy Values
Some OCX options can be configured using environment variables instead of command line flags. For example, the --offline flag can be set by configuring the OCX_OFFLINE environment variable to a truthy value. Truthy values are case-insensitive and include:
1yyesontrue
for enabling an option, and
0nnoofffalse
for disabling an option.
Internal
OCX_AUTH_<REGISTRY>_TYPE
The authentication type for the registry.
Valid values are:
basicbeareranonymous
OCX_AUTH_<REGISTRY>_USER
Configures the username for the registry when using basic authentication. The corresponding password should be configured using the OCX_AUTH_<REGISTRY>_TOKEN variable.
This value is ignored if the OCX_AUTH_<REGISTRY>_TYPE is not set to basic.
OCX_AUTH_<REGISTRY>_TOKEN
Configures the access token for the registry. For basic authentication, this value will be used as the password.
This value is ignored if the OCX_AUTH_<REGISTRY>_TYPE is not set to bearer or basic.
OCX_OFFLINE
When set to a truthy value, OCX will run in offline mode, which will not attempt to fetch any remote information. The command line option --offline takes precedence over this variable.
OCX_REMOTE
When set to a truthy value, OCX will use the remote index by default instead of the local index. The command line option --remote takes precedence over this variable.
External
DOCKER_CONFIG
The location of the docker configuration file.