Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Container creation error using Podman #1582

Closed
satonreb opened this issue Mar 8, 2023 · 2 comments
Closed

Container creation error using Podman #1582

satonreb opened this issue Mar 8, 2023 · 2 comments

Comments

@satonreb
Copy link

satonreb commented Mar 8, 2023

Describe the bug

Running watchtower using Podman return error when a new container is created

time="2023-03-07T20:00:49Z" level=info msg="Creating /hello_world_test"
time="2023-03-07T20:00:49Z" level=error msg="Error response from daemon: container create: error running container create option: names must match [a-zA-Z0-9][a-zA-Z0-9_.-]*: invalid argument"

Steps to reproduce

I was able to launch watchtower using Podman using command

podman run \
    --detach \
    --name watchtower \
    --privileged \
    --volume /run/user/${UID}/podman/podman.sock:/var/run/docker.sock:z \
    --restart=on-failure:3 \
    docker.io/containrrr/watchtower:latest \
    --revive-stopped \
    --cleanup \
    --remove-volumes \
    --label-enable \
    --interval 3600

Initially it seem to function as expected based on logs,

time="2023-03-07T19:00:24Z" level=info msg="Watchtower 1.5.3"
time="2023-03-07T19:00:24Z" level=info msg="Using no notifications"
time="2023-03-07T19:00:24Z" level=info msg="Only checking containers using enable label"
time="2023-03-07T19:00:24Z" level=info msg="Scheduling first run: 2023-03-07 20:00:24 +0000 UTC"
time="2023-03-07T19:00:24Z" level=info msg="Note that the first check will be performed in 59 minutes, 59 seconds"
time="2023-03-07T20:00:24Z" level=info msg="Found new hello_world_test:latest image (73c22c119cbe)"
time="2023-03-07T20:00:25Z" level=info msg="Stopping /hello_world_test (d711e4cf1ff6) with SIGTERM"
time="2023-03-07T20:00:49Z" level=info msg="Creating /hello_world_test"

but then it fails to create a new container after it detects the changed image

time="2023-03-07T20:00:49Z" level=info msg="Creating /hello_world_test"
time="2023-03-07T20:00:49Z" level=error msg="Error response from daemon: container create: error running container create option: names must match [a-zA-Z0-9][a-zA-Z0-9_.-]*: invalid argument"
time="2023-03-07T20:00:49Z" level=info msg="Session done" Failed=0 Scanned=1 Updated=0 notify=no
time="2023-03-07T21:00:24Z" level=info msg="Session done" Failed=0 Scanned=0 Updated=0 notify=no
time="2023-03-07T22:00:24Z" level=info msg="Session done" Failed=0 Scanned=0 Updated=0 notify=no

Expected behavior

My expectation is that container is created in the same way as using Docker.

Screenshots

No response

Environment

System: Red Hat Enterprise Linux release 8.7 (Ootpa)

Podman:

Client:       Podman Engine
Version:      4.2.0
API Version:  4.2.0
Go Version:   go1.18.4
Built:        Fri Jan 13 08:45:32 2023
OS/Arch:      linux/amd64

Your logs

time="2023-03-07T19:00:24Z" level=info msg="Watchtower 1.5.3"
time="2023-03-07T19:00:24Z" level=info msg="Using no notifications"
time="2023-03-07T19:00:24Z" level=info msg="Only checking containers using enable label"
time="2023-03-07T19:00:24Z" level=info msg="Scheduling first run: 2023-03-07 20:00:24 +0000 UTC"
time="2023-03-07T19:00:24Z" level=info msg="Note that the first check will be performed in 59 minutes, 59 seconds"
time="2023-03-07T20:00:25Z" level=info msg="Found new hello_world_test:latest image (8bf385238f21)"
time="2023-03-07T20:00:25Z" level=info msg="Stopping /hello_world_test (d711e4cf1ff6) with SIGTERM"
time="2023-03-07T20:00:49Z" level=info msg="Creating /hello_world_test"
time="2023-03-07T20:00:49Z" level=error msg="Error response from daemon: container create: error running container create option: names must match [a-zA-Z0-9][a-zA-Z0-9_.-]*: invalid argument"
time="2023-03-07T20:00:49Z" level=info msg="Session done" Failed=0 Scanned=1 Updated=0 notify=no
time="2023-03-07T21:00:24Z" level=info msg="Session done" Failed=0 Scanned=0 Updated=0 notify=no
time="2023-03-07T22:00:24Z" level=info msg="Session done" Failed=0 Scanned=0 Updated=0 notify=no
time="2023-03-07T23:00:24Z" level=info msg="Session done" Failed=0 Scanned=0 Updated=0 notify=no
time="2023-03-08T00:00:24Z" level=info msg="Session done" Failed=0 Scanned=0 Updated=0 notify=no
time="2023-03-08T01:00:24Z" level=info msg="Session done" Failed=0 Scanned=0 Updated=0 notify=no
time="2023-03-08T02:00:24Z" level=info msg="Session done" Failed=0 Scanned=0 Updated=0 notify=no
time="2023-03-08T03:00:24Z" level=info msg="Session done" Failed=0 Scanned=0 Updated=0 notify=no
time="2023-03-08T04:00:24Z" level=info msg="Session done" Failed=0 Scanned=0 Updated=0 notify=no
time="2023-03-08T05:00:24Z" level=info msg="Session done" Failed=0 Scanned=0 Updated=0 notify=no
time="2023-03-08T06:00:24Z" level=info msg="Session done" Failed=0 Scanned=0 Updated=0 notify=no
time="2023-03-08T07:00:24Z" level=info msg="Session done" Failed=0 Scanned=0 Updated=0 notify=no
time="2023-03-08T08:00:24Z" level=info msg="Session done" Failed=0 Scanned=0 Updated=0 notify=no
time="2023-03-08T09:00:24Z" level=info msg="Session done" Failed=0 Scanned=0 Updated=0 notify=no
time="2023-03-08T10:00:24Z" level=info msg="Session done" Failed=0 Scanned=0 Updated=0 notify=no
time="2023-03-08T11:00:24Z" level=info msg="Session done" Failed=0 Scanned=0 Updated=0 notify=no
time="2023-03-08T12:00:24Z" level=info msg="Session done" Failed=0 Scanned=0 Updated=0 notify=no
time="2023-03-08T13:00:24Z" level=info msg="Session done" Failed=0 Scanned=0 Updated=0 notify=no
time="2023-03-08T14:00:24Z" level=info msg="Session done" Failed=0 Scanned=0 Updated=0 notify=no

Additional context

No response

@github-actions
Copy link

github-actions bot commented Mar 8, 2023

Hi there! 👋🏼 As you're new to this repo, we'd like to suggest that you read our code of conduct as well as our contribution guidelines. Thanks a bunch for opening your first issue! 🙏

@piksel
Copy link
Member

piksel commented Mar 9, 2023

Podman does not use the same API as docker and as such, it is not compatible with watchtower.

See #1060 for the feature request.

@piksel piksel closed this as not planned Won't fix, can't repro, duplicate, stale Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants