Closed fgonza2 closed 2 years ago
I'm really not a Docker expert. Have you gone over the docker wiki closely?
These were contributed by @emes & @wurmr. Tagging them in case they can help.
I did find this. It describes a scenario where git is not installed in the container. https://forums.docker.com/t/bin-sh-git-not-found/105865
EDIT: If git isn't in the container it will throw this message while trying to get the latest version information from github.
Does the project now self update itself from github?
No but it shows the current version and indicates whether there is an update available.
Is it using git to figure out the latest version? Or are we tracking down something different?
It is using it to get the latest version.
How does it do that? Is it looking at contents of a specific file or is it peeking at git tags?
Typically you wouldn't want full blown git client in a docker image as it is a dev tool.
Solutions that come to mind are:
Digging further git is already in the running production image. https://github.com/tagyoureit/nodejs-poolController/blob/a2903da6c15f08d44883aa50ce325a005358ab21/Dockerfile#L11
Trying it quickly it looks like it works as intended:
@fgonza2 can you provide specific steps to reproduce?
Oh I see it, the msmi/nodejs-poolcontroller
image does not have git on it. However it still runs as the git command fails with a warning. The project still starts up and runs.
It appears that msmi/nodejs-poolcontroller
isn't built with the Dockerfile
that is in this project, I don't know who owns or maintains that repo. @rstrouse do you know who owns it and/or how the build gets triggered?
@fgonza2 you might have another error further down that is causing a crash.
I do not know who owns it but @tagyoureit probably does. He knows everything.
I don't know...
BTW, the code to check the git release is in a try/catch block and other than the messages /bin/sh: git: not found /bin/sh: git: not found
can be safely ignored. It's only used to display the Git checksum in njsPC if it is in a Git directory that was cloned from the repo. I'll see if I can redirect the output solely to node so it doesn't hit the console.
Like @wurmr said, this is ISN'T the bug causing a crash.
Repro steps are simple, run the docker-compose.yaml that is in the wiki. Here is mine:
version: 3.7 services: poolcontroller: image: msmi/nodejs-poolcontroller container_name: poolcontroller restart: always user: node:dialout ports:
- "4200:4200" volumes:
- /home/myuser/containers/pool/config.json:/app/config.json
- /home/myuser/containers/pool/data:/app/data
So if the git error is not the issue then what else could it be?
@fgonza2 can you include the full output of your docker compose up
command?
Alternatively you can run that container directly just to see what the output looks like:
docker run -it --rm msmi/nodejs-poolcontroller
Another thing I can think of is make sure you perodically run docker pull msmi/nodejs-poolcontroller
to get the latest version of the image, the compose file you are using does not include a version.
I would recommend to run in the same folder where you have docker-compose.yaml the following commands periodically:
docker-compose pull
docker-compose up -d
These commands will pull the latest version of the images you declared in the yaml file, then it will drop the containers, if they already exist, and create new containers using the latest images.
Piggybacking here, but the sample Dockerfile is currently broken due to referring to the deprecated python
package. That should be replaced with python3
.
Piggybacking here, but the sample Dockerfile is currently broken due to referring to the deprecated python package. That should be replaced with python3.
This change was added to the repo for njsPC and dashPanel
Describe the bug Ueed docker compose in Ubuntu
To Reproduce Steps to reproduce the behavior: implemented the docker-compose examples in the wiki
This is what i get:
Init state for Pool Controller /bin/sh: git: not found /bin/sh: git: not found Pentair EasyTouch System Detected! RS485 Stats:{ "bytesReceived": 527 "success": 11, "failed": 1, "bytesSent": 60, "collisions": 0, "failureRate": 8.33% }