puppetlabs / puppetlabs/puppetlabs-docker

Docker compose restarting service with docker.io/library/ container

Open
#967 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Ruby
Stars
94
Forks
337
Avg merge
11d 15h
Merged PRs (30d)
2

Description

Describe the Bug

docker_compose will not register a service as running if one of the containers uses an image in the form docker.io/library/<name>. This seems to be an old format but it is still valid and used (eg. by authentik).

Expected Behavior

The provider should handle prefixes like this and ignore them when looking for running containers. The running container will show <name>:<version> rather than docker.io/library/<name>:<version>.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Deploy authentik with the docker_compose resource
    1. Something like
docker_compose { 'authentik':
    ensure => present,
    compose_files => ['/my.compose.yaml']
}
  1. Run puppet several times, each time it will report the service is not running and restart it.

Environment

  • Version 7.0.0
  • Platform Ubuntu 22.04

Additional Context

I followed the authentik docs for setup and then moved the .env and docker-compose.yaml files to puppet

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the docker_compose resource's handling of image names and compare the configured image form with the name reported for running containers. Reproduce the authentik-style compose setup on Ubuntu 22.04, then verify repeated Puppet runs recognize the service as running instead of restarting it.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose
Domain
devops, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.