Quite lost with this one. I can demonstrate the issue with this simple Gitlab CI:
image:
name: docker/compose:1.29.0
entrypoint: ['']
variables:
DOCKER_HOST: tcp://docker:2375/
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
stages:
- build
build:
stage: build
script:
- cp /root/temp/smctl smctl
- ls -ltrh
- chmod +x smctl
- ./smctl --help
I get the following result:
File gets copied
ls shows the smctl file exists in the current directory
When I try to run the executable, I get the following error:
/bin/sh: eval: line 154: ./smctl: not found
What is going on here? Thanks
Check that the packet is installed on the docker image
docker/compose:1.29.0and not on the host machine, otherwise you'll need to install it either withbefore_scriptor directly inscript.