Code Monkey home page Code Monkey logo

Comments (5)

OneCDOnly avatar OneCDOnly commented on August 10, 2024 1

Sorry mate, I'm not the best person to ask about this. You may need a docker guru to suggest a fix.

from runlast.

OneCDOnly avatar OneCDOnly commented on August 10, 2024

Hi @lukjod :)

$PATH won't matter as rm and rmdir are builtins.

Is config.json a directory, or a file?

Is your script generating any stdout or stderr? What error messages are shown?

There's a possibility the /root/.docker/config.json directory is being created after RunLast has executed your script. If so, you might look at introducing a delay before your rm command executes.

from runlast.

lukjod avatar lukjod commented on August 10, 2024

Thx for quick response.
Problem is that before restart UT is file which contains logins for docker servers needed by watchtower. After restart it becomes empty folder which by script I want to delete, create new config.json file and restart watchtower docker. I always getting stuck on deleting this folder. Will Tru tomorrow to add some delay and report back.

from runlast.

lukjod avatar lukjod commented on August 10, 2024

Hallo again,
unfortunatelly sleep 300 did't help, it simply doesn't want to delete that folder. I'm out of ideas
my script
`#!/bin/bash

PATH=/opt/bin:/opt/sbin:/share/CACHEDEV1_DATA/.qpkg/container-station/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/bin/X11:/usr/local/sbin:/usr/local/bin:/root/.docker:$PATH

sleep 300s
docker stop gotify
sleep 3s
rm -r /root/.docker/config.json
rmdir --ignore-fail-on-non-empty /root/.docker/config.json
docker stop watchtower
sleep 3s
docker login -u lukjod -p *************
sleep 3s
docker login ghcr.io/haveagitgat/tdarr -u lukjod -p ghp_C3Zu6lnz1111111111111111
sleep 3s
docker start gotify
sleep 3s
docker start watchtower`

log

`RunLast (20230112)
[Wed Jan 10 18:36:06 CET 2024] begin "start" scripts ...
[Wed Jan 10 18:36:06 CET 2024] -> execute: "'/share/CACHEDEV1_DATA/.qpkg/RunLast/scripts/10-crontab_restart.sh'" ...
[Wed Jan 10 18:36:12 CET 2024] => exitcode: (0)
[Wed Jan 10 18:36:12 CET 2024] => stdout: "Stopping periodic command scheduler: crond.
Starting periodic command scheduler: crond."
[Wed Jan 10 18:36:12 CET 2024] => stderr: ""
[Wed Jan 10 18:36:12 CET 2024] -> execute: "'/share/CACHEDEV1_DATA/.qpkg/RunLast/scripts/20-docker_restart.sh'" ...
[Wed Jan 10 18:41:27 CET 2024] => exitcode: (1)
[Wed Jan 10 18:41:27 CET 2024] => stdout: "watchtower
Login Succeeded
Login Succeeded
gotify"
[Wed Jan 10 18:41:27 CET 2024] => stderr: "rmdir: '/root/.docker/config.json': No such file or directory
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
WARNING! Your password will be stored unencrypted in /share/homes/admin/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

WARNING! Using --password via the CLI is insecure. Use --password-stdin.
WARNING! Your password will be stored unencrypted in /share/homes/admin/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/root/.docker/config.json" to rootfs at "/config.json": mount /root/.docker/config.json:/config.json (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
Error: failed to start containers: watchtower"
[Wed Jan 10 18:41:27 CET 2024] end "start" scripts`

It simply can't find directory to remove is 5 min to short or can be other problem.
What do You think about it?
Any help welcome and thx in advance

from runlast.

lukjod avatar lukjod commented on August 10, 2024

ok thank You will try on watchtower github then

from runlast.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.