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

Can't shut down the container and restart it #1805

Closed
leic4u opened this issue Oct 19, 2023 · 4 comments
Closed

Can't shut down the container and restart it #1805

leic4u opened this issue Oct 19, 2023 · 4 comments

Comments

@leic4u
Copy link

leic4u commented Oct 19, 2023

Describe the bug

There is a update of this container, watchtower only pulls the new images and modify the image tag, can't shut down the container and restart it.
image

image

My watchtower's compose file:(my server is arm64)

version: '3.7'
  
services:
  watchtower:
    image: containrrr/watchtower:arm64v8-latest
    container_name: watchtower
    restart: unless-stopped
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      WATCHTOWER_MONITOR_ONLY: 'true'
      WATCHTOWER_NOTIFICATIONS: email
      WATCHTOWER_NOTIFICATION_EMAIL_FROM: ***@***.com
      WATCHTOWER_NOTIFICATION_EMAIL_TO: ***@***.com
      # you have to use a network alias here, if you use your own certificate
      WATCHTOWER_NOTIFICATION_EMAIL_SERVER: smtp.***.com
      WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PORT: 25
      WATCHTOWER_NOTIFICATION_EMAIL_SERVER_USER: ***@***com
      WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PASSWORD: ***
      WATCHTOWER_NOTIFICATION_EMAIL_DELAY: 2
    command: --cleanup

Steps to reproduce

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

shut down the container and restart it successfully

Screenshots

No response

Environment

  • Platform ubuntu: 20.04.5 LTS
  • Architecture: Arm64
  • Docker Version: Docker version 23.0.1, build a5ee5b1

Your logs

there is only info logs

time="2023-10-17T07:56:14Z" level=info msg="Watchtower 1.6.0"
time="2023-10-17T07:56:14Z" level=info msg="Using notifications: smtp"
time="2023-10-17T07:56:14Z" level=info msg="Checking all containers (except explicitly disabled with label)"
time="2023-10-17T07:56:14Z" level=info msg="Scheduling first run: 2023-10-18 07:56:14 +0000 UTC"
time="2023-10-17T07:56:14Z" level=info msg="Note that the first check will be performed in 23 hours, 59 minutes, 59 seconds"
time="2023-10-18T07:56:35Z" level=info msg="Session done" Failed=0 Scanned=15 Updated=0 notify=no
time="2023-10-19T07:56:31Z" level=info msg="Found new whyour/qinglong:latest image (a50899cee6e1)"
time="2023-10-19T07:56:42Z" level=info msg="Session done" Failed=0 Scanned=15 Updated=1 notify=no


### Additional context

_No response_
@github-actions
Copy link

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! 🙏

@leic4u
Copy link
Author

leic4u commented Oct 19, 2023

Accroding to this issue, the bug is made by docker compose.

@leic4u leic4u closed this as completed Oct 19, 2023
@piksel
Copy link
Member

piksel commented Oct 21, 2023

Since you are using WATCHTOWER_MONITOR_ONLY: 'true', there should be no updates at all. The only thing watchtower does is pull the new image. Perhaps something else is starting the new container?

Edit: I just realized that the second screenshot is ofdocker images. So everything seems correct, but it sounds like you just want to remove the MONITOR_ONLY environment variable...

@leic4u
Copy link
Author

leic4u commented Oct 21, 2023

Since you are using WATCHTOWER_MONITOR_ONLY: 'true', there should be no updates at all. The only thing watchtower does is pull the new image. Perhaps something else is starting the new container?

Edit: I just realized that the second screenshot is ofdocker images. So everything seems correct, but it sounds like you just want to remove the MONITOR_ONLY environment variable...

Thanks bro!

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