This is usually caused by some of the dependencies relying on a compiled artifact which is available locally but not on the central repository.
Make sure to mount the local repository into the Docker image so that the local maven can leverage the local artifact (side benefit, it wont download anything already present, making the test faster)
Example of such command
docker run -it -e "SNYK_TOKEN=YOUR_TOKEN_HERE" -e "MONITOR=true" -v "/Users/pstember/Git/java-goof:/project" -v "/Users/pstember/.m2:/root/.m2" -v "/Users/pstember/.ivy2:/root/.ivy2" snyk/snyk-cli:maven-3.6.1 test --org=second-org --file=todolist-web-common/pom.xml
where the important bit is
-v "/Users/USERNAME/.m2:/root/.m2" -v "/Users/USERNAME/.ivy2:/root/.ivy2"