Combining Projects doesn't work

I am trying to combine Pi-Hole and Balena Sound and am following this article using git submodules. When I try to push the project, I get:

[Error]             Could not detect project type: Service sound-supervisor: Specified file not found or is invalid: balena-sound/core/sound-supervisor/Dockerfile.template

My docker-compose file:

version: "2.1"

volumes:
  pihole_config:
  dnsmasq_config:


services:
  pihole:
    build: ./balena-pihole/pihole
    cap_add:
      - SYS_TTY_CONFIG
      - NET_ADMIN
    volumes:
      - "pihole_config:/etc/pihole"
      - "dnsmasq_config:/etc/dnsmasq.d"
    dns:
      - "127.0.0.1"
      - "1.1.1.1"
    network_mode: host
    labels:
      io.balena.features.dbus: "1"
    devices:
      - /dev/tty0
      - /dev/tty1
    tmpfs:
      - /var/log/pihole

  unbound:
    build: ./balena-pihole/unbound
    ports:
      - "5053:5053/tcp"
      - "5053:5053/udp"

  # # https://github.com/balenablocks/fbcp
  # fbcp:
  #   image: balenablocks/fbcp:1.0.0
  #   privileged: true

  # https://github.com/balenablocks/hostname
  hostname:
    build: ./balena-pihole/hostname
    restart: no
    labels:
      io.balena.features.supervisor-api: 1
    environment:
      SET_HOSTNAME: pi4-balena-sound-and-pihole
  
  # Core services
  # -- Required for a fully featured installation of balenaSound
  # -- Mutiroom services can be removed if not using multiroom mode
  audio:
    build: ./balena-sound/core/audio
    privileged: true
    labels:
      io.balena.features.dbus: 1
    ports:
      - 4317:4317
  
  sound-supervisor:
    build: 
      context: ./balena-sound
      dockerfile: ./balena-sound/core/sound-supervisor/Dockerfile.template
    network_mode: host
    labels:
      io.balena.features.balena-api: '1'
      io.balena.features.supervisor-api: 1
  
  # Plugins
  # -- Additional plugins can be added. See https://sound.balenalabs.io/docs/plugins.
  # -- Remove unwanted plugins as needed
  bluetooth:
    build: ./balena-sound/plugins/bluetooth
    restart: on-failure
    network_mode: host
    cap_add:
      - NET_ADMIN
    labels:
      io.balena.features.dbus: 1

If anybody can catch the mistake, I would be much obliged!

Hi,

In the part where you specify your sound-supervisor build, you’ve got

 build: 
      context: ./balena-sound
      dockerfile: ./balena-sound/core/sound-supervisor/Dockerfile.template

This means it will look for the dockerfile path specified inside the build context ./balena-sound.
The resulting path it’s looking for becomes ./balena-sound/balena-sound/core/sound-supervisor/Dockerfile.template, which doesn’t exist.

Changing the dockerfile entry to omit the ./balena-sound/ part works.

1 Like

Thanks @TJvV for your awesome support!

@notmyidea welcome to the balena community! did you solve your issue? Feel free to add the solution here :slight_smile:

Hi @mpous , yes, it solved the issue. Thanks @TJvV !

1 Like