I want to deploy container group to Azure Container Instances from bitbucket pipelines. I have following bitbucket-pipelines.yml file:
image: ubuntu:20.04
clone:
  depth: 5
options:
  max-time: 15
pipelines:
  branches:
    master:
      - step:
          name: Deploy to aci
          deployment: test
          script:
            - apt-get update
            - apt-get install curl -y
            - curl -L https://raw.githubusercontent.com/docker/compose-cli/main/scripts/install/install_linux.sh | sh
            - curl -sSL https://github.com/docker/compose-cli/releases/download/v2.0.0-beta.3/docker-compose-linux-amd64 -o docker-compose
            - chmod +x docker-compose
            - mkdir -p ~/.docker/cli-plugins
            - mv docker-compose ~/.docker/cli-plugins/docker-compose
            - docker login azure --client-id $CLIENTID --tenant-id $TENANTID --client-secret $SECRET
            - docker login myregistry.azurecr.io -u $USERNAME -p $PASS 
            - docker context create aci myContext --subscription-id "00000000-0000-0000-0000-000000000000" --resource-group "myResouceGroup" --location "westeurope"
            - docker --context myContext compose up 
      services:
        - docker
I am getting following error on docker --context myContext compose up command:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
All other docker command seems to be working so it's seems to be problem with docker-compose cli that it doesn't find the deamon running.
I tried adding export DOCKER_HOST="tcp://0.0.0.0:2375" before docker compose up but it didn't help.
Is there something I am missing?
UPDATE 1:
If I update last command from:
- docker --context myContext compose up
To:
- docker context use myContext 
- docker compose up
I am getting different error:
failed to dial gRPC: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing unable to upgrade to h2c, received 403"
UPDATE 2
Added docker version and docker ps for more info. Output:
docker version
Client: Docker Engine - Community
 Cloud integration: 1.0.17
 Version:           19.03.15
 API version:       1.40
 ...
Server: Docker Engine - Community
 Engine:
  Version:          20.10.5
  API version:      1.41 (minimum version 1.12)
  ...
docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
 
    