Closed Nonobis closed 6 months ago
Ok so not a bug sorry.
But in my case, i have only one entrypoint (in an external lxc under docker-compose, it's working perflectly), how can i set */bin/sh -c "apk update && apk add --no-cache awake && rm -rf /var/cache/apk/ && ./upsnap serve --http 0.0.0.0:8090"** in the entrypoint in cosmos if i can't use \" for protect quotes ?
Found a solution ...
In Cosmos-Server json :
"entrypoint": "sh -c /app/pb_data/startup.sh",
Extracted command in startup.sh
You dont need quotations, edit the original compose with
entrypoint: /bin/sh -c "apk update && apk add --no-cache <YOUR_PACKAGE> && rm -rf /var/cache/apk/* && ./upsnap serve --http 0.0.0.0:8090"
and it will work
What happened?
I am trying to add UpSnap via compose, because i am not findind a version in official or custom appstore
What should have happened?
Docker should be create serving on port 8090 and custom apk "awake" should be installed correctly. If u remove custom endpoint cosmos create and run docker correctly. But i need the custom apk....
How to reproduce the bug?
Relevant log output
Other details
Json generated by cosmos
{ "services": { "upsnap": { "container_name": "upsnap", "image": "ghcr.io/seriousm4x/upsnap:4", "environment": [ "TZ=Europe/Paris", "UPSNAP_INTERVAL=@every 10s", "UPSNAP_SCAN_RANGE=192.168.1.0/24", "UPSNAP_SCAN_TIMEOUT=500ms", "UPSNAP_PING_PRIVILEGED=true", "UPSNAP_WEBSITE_TITLE=WOL Family D.", "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" ], "labels": {}, "ports": [], "volumes": [ { "Type": "bind", "Source": "/home/nonobis/upsnap", "Target": "/app/pb_data" } ], "networks": { "host": {} }, "routes": null, "restart": "unless-stopped", "devices": null, "expose": [], "depends_on": [], **"entrypoint": "/bin/sh -c \"apk update && apk add --no-cache awake && rm -rf /var/cache/apk/* && ./upsnap serve --http 0.0.0.0:8090\"",** "working_dir": "/app", "hostname": "cosmos", "network_mode": "host", "healthcheck": { "test": [ "CMD-SHELL", "curl -fs \"http://localhost:8090/api/health\" || exit 1" ], "interval": 10, "timeout": 0, "retries": 0, "start_period": 0 }, "dns": [ "192.168.1.254" ] } } }
System details