Skip to content
Formatting authored by Kim Carter's avatar Kim Carter
......@@ -186,15 +186,20 @@ Leaving `docker stats` running in a terminal is often useful to see which contai
1. [docker-compose-ui](https://github.com/francescou/docker-compose-ui) needs to be running.
Need to use the user-defined network already created in order for Lambda function in (what was previously [docker-lambda](https://github.com/lambci/docker-lambda)) the [AWS managed Docker Image](https://aws.amazon.com/blogs/compute/the-aws-serverless-application-model-cli-is-now-generally-available/) to be able to send requests to `docker-compose-ui`
~/Source/purpleteam-s2-containers `docker run --name docker-compose-ui -v $(pwd):$(pwd) -w $(dirname $(pwd)) -p 5000:5000 --rm --network compose_pt-net -v /var/run/docker.sock:/var/run/docker.sock francescou/docker-compose-ui:1.13.0`
You need to use the user-defined network already created in order for Lambda function in (what was previously [docker-lambda](https://github.com/lambci/docker-lambda)) the [AWS managed Docker Image](https://aws.amazon.com/blogs/compute/the-aws-serverless-application-model-cli-is-now-generally-available/) to be able to send requests to `docker-compose-ui`. From the `purpleteam-s2-containers/` root directory, run the following command:
```shell
docker run --name docker-compose-ui -v $(pwd):$(pwd) -w $(dirname $(pwd)) -p 5000:5000 --rm --network compose_pt-net -v /var/run/docker.sock:/var/run/docker.sock francescou/docker-compose-ui:1.13.0
```
Additional resources:
* docker compose ui [API](https://francescou.github.io/docker-compose-ui/api.html)
* Once running, `http://localhost:5000/api/v1/projects` will list your projects
* `curl -X PUT http://localhost:5000/api/v1/services --data '{"service":"chrome","project":"selenium-standalone","num":"2"}' -H'Content-type: application/json'` will start two containers defined by the `chrome` service in the `purpleteam-s2-containers/selenium-standalone/docker-compose.yml`
* Verify with `docker container ls`
* Then bring down with ~/Source/purpleteam-s2-containers/selenium-standalone `docker-compose down`
* The following command will start two containers defined by the `chrome` service in the `purpleteam-s2-containers/selenium-standalone/docker-compose.yml` file
```shell
curl -X PUT http://localhost:5000/api/v1/services --data '{"service":"chrome","project":"selenium-standalone","num":"2"}' -H'Content-type: application/json'
```
* Verify with either `docker stats` or `docker container ls`
* Then bring the `purpleteam-s2-containers/selenium-standalone` `docker-compose.yml` down
<!---->
2. Host Lambda functions:
......
......