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 label option appears to be getting ignored #227

Open
alister-cf opened this issue Jul 10, 2023 · 0 comments
Open

Container label option appears to be getting ignored #227

alister-cf opened this issue Jul 10, 2023 · 0 comments

Comments

@alister-cf
Copy link

alister-cf commented Jul 10, 2023

If I setup and exec job on another container via labels it fails as it's unable to find my bash script.
Error: StdOut: OCI runtime exec failed: exec failed: unable to start container process: exec: "/backup": stat /backup: no such file or directory: unknown

I assume this is because it's not actually using the right container as I have tried an absolute path too.

I am able to do said action manually via
docker compose exec backup /backup my_container

services:
ofelia:
image: mcuadros/ofelia:latest
command: daemon --docker
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
my_container:
image: my_container:latest
restart: always
labels:
ofelia.enabled: "true"
ofelia.job-exec.backup-pg1.schedule: "@every 2m"
ofelia.job-exec.backup-pg1.command: "/backup my_container"
ofelia.job-exec.backup-pg1.container: backup
backup:
image: backup:latest
container_name: backup
build: ../
restart: "no"
volumes:
- /opt/backups:/backups
- '/var/run/docker.sock:/var/run/docker.sock'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant