Hello,
I’m having an issue with mounting to docker and wondered if anyone has seen a similar issue. I’ll preface this by saying, if I run the same command with docker running locally, it works fine.
I have this defined in a circleCI job:
load_tests_the_second:
executor: general
steps:
- attach_workspace
- datadog-agent/setup
- setup_remote_docker:
version: default
- run:
name: Docker exists
command: docker -v
- run:
command: |
docker pull grafana/k6:latest
echo $PWD
echo "Above is current path"
docker run -i -v $PWD:/ci/ grafana/k6:latest run /ci/load_tests/tests/backend/basicGET.js
I end up with the following error:
time="2024-02-28T10:34:25Z" level=error msg="The moduleSpecifier \"/ci/load_tests/tests/backend/basicGET.js\" couldn't be found on local disk. Make sure that you've specified the right path to the file. If you're running k6 using the Docker image make sure you have mounted the local directory (-v /local/path/:/inside/docker/path) containing your script and modules so that they're accessible by k6 from inside of the container, see https://grafana.com/docs/k6/latest/using-k6/modules/#using-local-modules-with-docker."
So despite working locally, it seems to me the local files are not making it to the container. Via circleCI, can I explore the file system on the container? I’ve tried /bin/sh etc without any luck and now I’m stuck