I am trying to run mongo:6 in docker container with docker compose file but it always gets exited with warning.
Docker version : 23.0.4, build f480fb1
Docker-compose version: v2.17.2
docker-compose.yml
version: '3.8'
services:
mongo-db:
container_name: mongo-db
image: mongo:6
volumes:
- ../psvolumes/mongo6:/data/db
environment:
- COMPOSE_PROJECT_NAME=mongo
- MONGO_INITDB_ROOT_USERNAME=
- MONGO_INITDB_ROOT_PASSWORD=
ports:
- 27017:27017
networks:
- mongo_network
restart: unless-stopped
networks:
mongo_network:
driver: bridge
docker compose up
Output:
[+] Running 2/1
✔ Network ams-api_mongo_network Created 0.1s
✔ Container mongo-db Created 0.0s
Attaching to mongo-db
mongo-db |
mongo-db | WARNING: MongoDB 5.0+ requires a CPU with AVX support, and your current system does not appear to have that!
mongo-db | see https://jira.mongodb.org/browse/SERVER-54407
mongo-db | see also https://www.mongodb.com/community/forums/t/mongodb-5-0-cpu-intel-g4650-compatibility/116610/2
mongo-db | see also https://github.com/docker-library/mongo/issues/485#issuecomment-891991814
mongo-db |
mongo-db exited with code 0
But it is always restarting and not get started