Docker: Unable to execute .sh file located in container


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: Cannot run program “/var/lib/ignition/data/”: 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/ 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.

@kcollins1 @kcollins maybe you know?

This is my docker compose code if that would be important:

version: '3.1'
    image: kcollins/ignition:8.1.15  
      - "9089:8088"
    stop_grace_period: 30s
      # - ./gateway_backup.gwbk:/restore.gwbk
      - Ignition9089-data:/var/lib/ignition/data
      driver: "json-file"
        max-size: "200k"
        max-file: "10"
      - IGNITION_EDITION=standard
      - TZ=Europe/Brussels # see
      - GATEWAY_MODULES_ENABLED=alarm-notification,enterprise-administration,modbus-driver-v2,opc-ua,perspective,reporting,symbol-facory,tag-historian,user-manual,web-developer

EDIT: also tried, it gave me back the hostname of my laptop… So it’s really looking in the wrong device.

Scope seems like a probable issue here… You won’t be able to invoke your execute call against that shell script from Client/Designer scope (either in the Designer Script Console, or in a Vision window via a button). You’ll need to invoke it in gateway scope (since that is where your script presumably exists in the data volume).

There are several ways to approach it, depending on your needs.

These both imply you’re running code in the Client/Designer scope (script console, for example), and not in a scope that executes on the Gateway / in your container.

edit: doh, like Kevin C just said basically.

Thanks guys. Earlier it was the permissions of the ignition user, but that was solved now, and it was indeed the execution scope now.