Escaping characters using "docker-compose"


I need to use “/$2” string in an ingress annotation under docker-compose, but apparently this can’t be escaped to avoid internal envsubst. I have managed to circunvent this by “brute force” as below.

Is there a better way?

    labels: nginx
      # strip path para ingress-nginx "true" "/$$$$2" # okteto "escape"
      - path: /whoami(/|$)(.*)
        service: whoami
        port: 80

Hi @andrevtg !

Currently, the way you found is the only supported way. It is a known issue, and it’s something the team is looking into improving in the near future.