How to substitute environment variable in TeamCity docker compose build?

I am trying Teamcity on-premise solution using docker-compose. I have a project which needs a docker compose runner type. Here is the docker compose override yaml file:

version: '3'


services:
  
  nextjs:
    build:
      context: ./frontend
      dockerfile: ${NEXTJS_DOCKERFILE:-Dockerfile}
    volumes:
      - ./frontend:/app
      - /app/node_modules
      - /app/.next
  nginx:
    build: ./nginx
    ports:
      - 80:80

I have added the env variable using parameter on build configuration too:

The docker compose step gives the following error:

It seems like the variable substitution is not happening, I am not sure why. Could anyone tell me what is happening?

Team city version : 2022.04.2

Thanks

 

 

 

 

 

 

 

 

0

Please sign in to leave a comment.