Does "okteto deploy --build" support variables?

docker-compose.yml

version: '3.8'
services:
  phpmyadmin:
    image: phpmyadmin/phpmyadmin
    container_name: phpmyadmin
    volumes:
      - ./docker/mysql-data/cfg/pma.php:/etc/phpmyadmin/config.user.inc.php
      - ./docker/mysql-data/import:/tmp/import
    ports:
      - ${PMA_PORT}:80
    environment:
      UPLOAD_LIMIT: 200000000
      MYSQL_ROOT_PASSWORD: root
      PMA_PORT: 8080

okteto deploy --build

  Can not convert '{PMA_PORT}:80=8080:80' to a port: Host IP is not allowed

To help us troubleshoot, what happens if you define the variable before running okteto deploy --build ?

export PMA_PORT=8080
okteto deploy --build

Hi @shipitsin-ilia !

If I recall correctly, okteto manifest doesn’t support local envvars.

One thing I usually do is to create the temporary file with the envvars interpolated with something like

envsubst < okteto-manifest-with-envvars.yaml > okteto.yaml && okteto up

This will replace the envvars from okteto-manifest-with-envvars.yaml with the values you have defined and dump it into okteto.yaml so that then okteto up picks it up