SeUniVr / RestTestGen

A framework for automated black-box testing of RESTful APIs.
Apache License 2.0
36 stars 9 forks source link

Unable to start using docker #18

Closed henning410 closed 5 months ago

henning410 commented 5 months ago

Follow your Readme, when running the command docker run -v ./:/app --network="host" rtg I get the error:

docker: Error response from daemon: create ./: "./" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path.

I think, the directory of -v option should be the directory of RestTestGen? So I tried instead docker run -v /home/user/Desktop/RestTestGen --network="host" rtg but I get the error:

FAILURE: Build failed with an exception.

* What went wrong:
Directory '/app' does not contain a Gradle build.

How can I run RestTestGen correctly using docker?

davidecorradini commented 5 months ago

Hello,

I just tried to run RTG within Docker myself, and it started correctly.

Have you run both the build and run commands? From the main directory?

Also, I see that the error is related to the string "./". It may depend on your operating system. What OS are you using? (I only tested the script in Ubuntu).

Best, Davide

henning410 commented 5 months ago

The build command docker build -t rtg . worked, yes.

I'm using Kali Linux

davidecorradini commented 5 months ago

This is (hopefully) a fixed version of the command you tried, with an absolute path do the RTG folder. I added :/app to map the RTG folder on your system to the /app folder in the docker container. docker run -v /home/user/Desktop/RestTestGen:/app --network="host" rtg Let me know if this works! Best, Davide

henning410 commented 5 months ago

This works perfectly, thank you very much for your quick help :)