Search code examples
dockerinstallationcouchdb

Docker Desktop couchDB - Apple Mac M1


I just want to create a docker container for couch db and my contents of the docker file is pretty straight forward. I am running this on Apple M1 which is using ARM processor, heard there are many issues w.r.t to it. I am getting this error when i try to start the docker container.

 couchdb:
    container_name: couchdb
    image: apache/couchdb:3.2.2
    volumes:
      - /opt/couchdb-322.data:/opt/couchdb/data:delegated
      - /opt/couchdb-322.etc/docker.ini:/opt/couchdb/etc/local.d/docker.ini:delegated
    environment:
      - COUCHDB_USER=username
      - COUCHDB_PASSWORD=password
    ports:
      - "5984:5984"
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:5984"]
      interval: 15s
      timeout: 2s
      retries: 20
      start_period: 1m

Error Message

[+] Running 1/0
 ✔ Container couchdb  Created                                                                                                                              0.0s 
Attaching to couchdb
couchdb  | /docker-entrypoint.sh: line 69: /opt/couchdb/etc/local.d/docker.ini: Is a directory
couchdb exited with code 1


Solution

  • To the docker compose file i added platform: linux/amd64 and the issue is fixed. I used this reference