0

I have clone TheSpaghettiDetective (https://github.com/TheSpaghettiDetective/TheSpaghettiDetective) repository and then use the docker-compose.yml to build it and it works great on my local machine. Now I want to push it to Azure Container Instances in a multi-container group, but can't get it working.

I tried using this tutorial from Microsoft, but this project is a lot more complex. The docker-compose file creates 4 containers that run, I couldn't figure out push them to Azure Container Registry with the tutorial, but was able to do so easily with the docker extension in VS Code.

Then when I tried deploy the images, I was able to get the docker context setup but the images wouldn't deploy. I think because they rely on the files I downloaded from github, to so I think I need to setup a file share in azure???

Where do I go from here? Is there no easy way to clone the repository into azure and use docker-compose up like I'm used to?

1 Answers1

0

The problem that the images don't deploy is the docker-compose.yml file does not set the image option. It only set the build option to build the images. But when the images are pushed into the ACR. You don't need to build the images again, just need to pull the images with the image option. See the example in the link you found:

version: '3'
services:
  azure-vote-back:
    image: mcr.microsoft.com/oss/bitnami/redis:6.0.8
    container_name: azure-vote-back
    environment:
      ALLOW_EMPTY_PASSWORD: "yes"
    ports:
        - "6379:6379"

  azure-vote-front:
    build: ./azure-vote
    image: mcr.microsoft.com/azuredocs/azure-vote-front:v1
    container_name: azure-vote-front
    environment:
      REDIS: azure-vote-back
    ports:
        - "8080:80"

You can find that the docker-compose.yml file configures the image to set the image name and use the build option to build the images. So try to add the image option in the docker-compose.yml file.

Charles Xu
  • 29,862
  • 2
  • 22
  • 39