0

I want to create a Azure Container Instance by using the website (https://portal.azure.com). The original docker command would look like this: docker run -d my/image --min-port=49160 --fingerprint.

On the advanced tab, I can enter a combination of key and value, for example min-port and 49152. But I also need to set fingerprint as key, without a value. This is not allowed and gives me an error message "Value must not be empty". Is there a solution, maybe with CLI?

Marc P.
  • 3
  • 4
  • It the console does not allow, you can set in dockerfile. `ENV fingerprint=${DO_NOT_SET_VALUE}`. as ENV is key-value. so this is one trick to declare without value. – Adiii Nov 21 '19 at 07:39

1 Answers1

0

You can use the CLI command to set the environment variable only with the variable and no value, the command would be like this:

az container create -g MyResourceGroup --name myapp --image myimage:latest --environment-variables key1=value1 key2=''

Then the environment variable key2 only has the name, no value.

Charles Xu
  • 29,862
  • 2
  • 22
  • 39