docker / compose

Define and run multi-container applications with Docker
https://docs.docker.com/compose/
Apache License 2.0
33.54k stars 5.17k forks source link

[BUG] Freezing and terminal spamming when using docker compose #11277

Closed J-Hoplin closed 1 week ago

J-Hoplin commented 8 months ago

Description

Hi! Firstly always thankful for providing awesome software! I'm currently working with docker with my environment: M2 Apple Silicon with macOS Sonoma 14.2. And some freezing and terminal spamming occur when running docker compose like image I attached. It takes about 51 second to build docker compose and this docker compose is not that heavy.

image

version: "3.7"
services:
  db:
    image: mongo:7.0
    container_name: mongodb-standalone
    restart: always
    environment:
      MONGO_INITDB_ROOT_USERNAME: root
      MONGO_INITDB_ROOT_PASSWORD: hoplin1234!
      MONGO_INITDB_DATABASE: golang
    ports:
      - 27017:27017
  redis:
    image: redis
    container_name: redis-standalone
    restart: always
    ports:
      - 6379:6379
  redis-manager:
    container_name: redis-manager
    image: rediscommander/redis-commander:latest
    restart: always
    ports:
      - 9000:8081

This resolve when I do factory reset with docker desktop, but it occurs again when I rebook my PC. I leave this issue because I this is kinda buggy thing. Or if there's any other solution I can take action in my local PC, it will be thankful!

Steps To Reproduce

No response

Compose Version

Docker Compose version v2.23.3-desktop.2

Docker Environment

Client:
 Version:    24.0.7
 Context:    desktop-linux
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.12.0-desktop.2
    Path:     /Users/hoplin/.docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.23.3-desktop.2
    Path:     /Users/hoplin/.docker/cli-plugins/docker-compose
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.0
    Path:     /Users/hoplin/.docker/cli-plugins/docker-dev
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.21
    Path:     /Users/hoplin/.docker/cli-plugins/docker-extension
  feedback: Provide feedback, right in your terminal! (Docker Inc.)
    Version:  0.1
    Path:     /Users/hoplin/.docker/cli-plugins/docker-feedback
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v0.1.0-beta.10
    Path:     /Users/hoplin/.docker/cli-plugins/docker-init
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
    Version:  0.6.0
    Path:     /Users/hoplin/.docker/cli-plugins/docker-sbom
  scan: Docker Scan (Docker Inc.)
    Version:  v0.26.0
    Path:     /Users/hoplin/.docker/cli-plugins/docker-scan
  scout: Docker Scout (Docker Inc.)
    Version:  v1.2.0
    Path:     /Users/hoplin/.docker/cli-plugins/docker-scout

Server:
 Containers: 3
  Running: 3
  Paused: 0
  Stopped: 0
 Images: 3
 Server Version: 24.0.7
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: runc io.containerd.runc.v2
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: d8f198a4ed8892c764191ef7b3b06d8a2eeb5c7f
 runc version: v1.1.10-0-g18a0cb0
 init version: de40ad0
 Security Options:
  seccomp
   Profile: unconfined
  cgroupns
 Kernel Version: 6.5.11-linuxkit
 Operating System: Docker Desktop
 OSType: linux
 Architecture: aarch64
 CPUs: 8
 Total Memory: 7.663GiB
 Name: docker-desktop
 ID: bb784854-5cb2-4c84-92e7-dd2a696c2565
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 HTTP Proxy: http.docker.internal:3128
 HTTPS Proxy: http.docker.internal:3128
 No Proxy: hubproxy.docker.internal
 Experimental: false
 Insecure Registries:
  hubproxy.docker.internal:5555
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: daemon is not using the default seccomp profile


### Anything else?

_No response_
jhrotko commented 6 months ago

hello, @J-Hoplin!

Sorry for the late response. I was checking your issue an it seems it's something related with rediscommander image. I changed your compose redis-manager service like so

redis-manager:
    container_name: redis-manager
    image: rediscommander/redis-commander:latest
    restart: always
    platform: linux/amd64 <----
    ports:
      - 9000:8081

could you give it a try and tell me if you are still having issues

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.