How to substitute environment variable in TeamCity docker compose build?

730 Views Asked by At

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: enter image description here

The docker compose step gives the following error:

enter image description here

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

There are 0 best solutions below