Running Marqo with docker compose?

I am trying to run Marqo with docker compose because I can’t use the privileged flag to do docker in docker in my environment. I am getting an SSL error from Marqo OS and the health check isn’t passing so Marqo won’t start. Here is my docker compose file, any suggestions on how to fix?

version: '3'
services:
  marqo-os:
    image: "marqoai/marqo-os:0.0.3"
    ports:
    - "9200:9200"
    - "9600:9600"
    environment:
      - discovery.type=single-node
    healthcheck:
     test: curl -s https://marqo-os:9200 >/dev/null || exit 1
     interval: 30s
     timeout: 10s
     retries: 50
  marqa:
    image: "marqoai/marqo:latest"
    ports:
    - "8882:8882"
    environment: 
      OPENSEARCH_URL: "https://marqo-os:9200"
    depends_on:
      marqo-os:
        condition: service_healthy
1 Like

The issue is with the healthcheck curl request. You will need to skip the certificate verification and also provide credentials to Marqo OS.

Here is an example with an updated curl command to perform the health check on the Marqo OS cluster. Note the --insecure to skip verification and the -u admin:admin credentials.

version: '3'
services:
  marqo-os:
    image: "marqoai/marqo-os:0.0.3"
    ports:
    - "9200:9200"
    - "9600:9600"
    environment:
      - discovery.type=single-node
    healthcheck:
     test: ["CMD-SHELL", "curl -X GET 'https://marqo-os:9200/_cluster/health' --insecure -H 'Content-Type: application/json' -u admin:admin >/dev/null || exit 1"]
     interval: 5s
     timeout: 3s
     retries: 50
  marqo:
    image: "marqoai/marqo:latest"
    ports:
    - "8882:8882"
    environment: 
      OPENSEARCH_URL: "https://marqo-os:9200"
    depends_on:
      marqo-os:
        condition: service_healthy