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 ...@@ -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. 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` 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:
~/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` ```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: Additional resources:
* docker compose ui [API](https://francescou.github.io/docker-compose-ui/api.html) * 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 * 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` * The following command will start two containers defined by the `chrome` service in the `purpleteam-s2-containers/selenium-standalone/docker-compose.yml` file
* Verify with `docker container ls` ```shell
* Then bring down with ~/Source/purpleteam-s2-containers/selenium-standalone `docker-compose down` 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: 2. Host Lambda functions:
... ...
......