Skip to content

Mongo 6.0+ Fails to Run Using WSL #667

Description

@jramonrod

Problem

When running the example docker-compose from https://hub.docker.com/_/mongo docker-compose fails with

mongo-express-1  | exec /sbin/tini: exec format error
mongo-1          | exec /usr/local/bin/docker-entrypoint.sh: exec format error

docker-compose.yml (copied from above link)

# Use root/example as user/password credentials
version: '3.1'

services:

  mongo:
    image: mongo:6
    restart: always
    environment:
      MONGO_INITDB_ROOT_USERNAME: root
      MONGO_INITDB_ROOT_PASSWORD: example

  mongo-express:
    image: mongo-express
    restart: always
    ports:
      - 8081:8081
    environment:
      ME_CONFIG_MONGODB_ADMINUSERNAME: root
      ME_CONFIG_MONGODB_ADMINPASSWORD: example
      ME_CONFIG_MONGODB_URL: mongodb://root:example@mongo:27017/

Architecture

Running opensuse in WSL 2

PS C:\Users\joses> wsl --list -v
  NAME                   STATE           VERSION
* openSUSE-Leap-15.5     Running         2
  docker-desktop-data    Running         2
  docker-desktop         Running         2
jose@HomePC:> uname -m
x86_64
jose@HomePC:> docker image inspect
....
        "Architecture": "amd64",
        "Os": "linux",
...

Workaround

Using mongodb with a lower version tag (5) and mongo-express as well (1.0.2-20-alpine3.19).

Expected

Mongodb and mongo-express example works out of the box.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions