Note1:
Note2: If you are a Docker Rootless user, i suggest you to use sudo
because Docker Rootless runs slirp4netns
with the --disable-host-loopback
option, so the Gatling cannot access localhost.
docker build -t gatling-on-docker -f Dockerfile .
- Run the container using the following command:
docker run -it -d --network=host --name gatling gatling-on-docker
Note: ensure to only remove --network=host
if you know how to configure the host.docker.internal
, or if you will call your machine's local ip, or if you are just not using Linux.
- Execute the following command to start running the default simulation or rinha de backend simulation:
- The default simulation
docker exec gatling /opt/gatling/bin/gatling.sh -rm local -sf /opt/gatling/user-files/simulations -s computerdatabase.ComputerDatabaseSimulation -rf /opt/gatling/results
- The rinha's simulation
docker exec gatling /opt/gatling/bin/gatling.sh -rm local -sf /opt/gatling/user-files/simulations -s RinhaBackendCrebitosSimulation -rf /opt/gatling/results
docker stop gatling && docker rm gatling
- Start the container
docker run -it -d -v /path/to/custom/config:/opt/gatling/conf \
-v /path/to/custom/user-files:/opt/gatling/user-files \
-v /path/to/results:/opt/gatling/results \
--network=host --name galing gatling-on-docker
- Execute your simulation
docker exec gatling /opt/gatling/bin/gatling.sh -rm local -sf /opt/gatling/user-files/simulations -s <name_of_your_simulation> -rf /opt/gatling/results