I’m setting up git within my docker container and following this guide. My container is not orchestrated, just running on my local Docker.
I’m trying to execute this line of code:
unfortunately, I keep getting the error:
java.io.IOException: Cannot run program “/var/lib/ignition/data/git-auto-commit.sh”: CreateProcess error=2, The system cannot find the file specified
I have made sure it is possible to read and execute the file with the chmod command.
Strangely enough, I am able to execute this code from my gateway:
So the gateway does have access to my local PC’s hard drive. I’m a bit confused on how that works and why the container doesn’t have access to it’s own files but does have access to my files.
In my docker command terminal, I am able to access /var/lib/ignition/data/git-auto-commit.sh and I am not able to access C:\temp\exec.bat. I would expect this is the same for Ignition, since it is installed in that container…
What could be wrong? Is it something to do with scope? Or something with volumes? I executed this script in my python scripts on the gateway.
This is my docker compose code if that would be important:
version: '3.1' services: gateway: image: kcollins/ignition:8.1.15 ports: - "9089:8088" stop_grace_period: 30s volumes: # - ./gateway_backup.gwbk:/restore.gwbk - Ignition9089-data:/var/lib/ignition/data logging: driver: "json-file" options: max-size: "200k" max-file: "10" environment: - ACCEPT_IGNITION_EULA=Y - IGNITION_EDITION=standard - GATEWAY_ADMIN_USERNAME=admin - GATEWAY_ADMIN_PASSWORD=password - TZ=Europe/Brussels # see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List - GATEWAY_MODULES_ENABLED=alarm-notification,enterprise-administration,modbus-driver-v2,opc-ua,perspective,reporting,symbol-facory,tag-historian,user-manual,web-developer volumes: Ignition9089-data:
EDIT: also tried system.net.getHostName(), it gave me back the hostname of my laptop… So it’s really looking in the wrong device.