Skip to content

Docker Compose always restart container #1003

@judzk

Description

@judzk

Describe the Bug

Docker Compose always restart container

Expected Behavior

If the container is running, docker compose should not restart the container

Steps to Reproduce

Steps to reproduce the behavior:

Use a docker compose

  docker_compose { 'cadvisor':
    ensure        => present,
    compose_files => ["${docker_data}/cadvisor/docker-compose.yaml"],
  }

Info: Checking for compose project cadvisor
Info: Checking for compose service cadvisor gcr.io/cadvisor/cadvisor:v0.49.1
Info: Checking for compose project cadvisor
Info: Checking for compose service cadvisor gcr.io/cadvisor/cadvisor:v0.49.1
Info: Rebuilding and Restarting all containers for compose project cadvisor
Info: Running compose project cadvisor
Notice: /Stage[main]/Cl_docker::Config/Docker_compose[cadvisor]: Triggered 'refresh' from 1 event

services:
  cadvisor:
    image: gcr.io/cadvisor/cadvisor:v0.49.1
    container_name: cadvisor
    volumes:
      - /:/rootfs:ro
      - /var/run:/var/run:ro
      - /sys:/sys:ro
      - /var/lib/docker/:/var/lib/docker:ro
      - /dev/disk/:/dev/disk:ro
    command:
    - '-port=8098'
    ports:
      - 8098:8098
    privileged: true
    devices:
      - /dev/kmsg

Environment

  • Debian 12
  • Docker last version
  • Puppet docker module 10.0.1

Additional Context

Add any other context about the problem here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @judzk

        Issue actions

          Docker Compose always restart container · Issue #1003 · puppetlabs/puppetlabs-docker