diff --git a/94_ecs_compose/README.md b/94_ecs_compose/README.md new file mode 100644 index 0000000..112916a --- /dev/null +++ b/94_ecs_compose/README.md @@ -0,0 +1,34 @@ +# ECS COMPOSE + +Demonstrate how to use ECS Compose + +* 59_composev2 [README.md](../59_composev2/README.md) + +## Setup + +```sh +docker context create ecs myecscontext +docker context list +docker context use myecscontext + +aws --profile myprofile --region eu-west-1 ecs list-clusters +``` + +```sh +# NOTE: This does not work. It will not deploy to eu-west-1 +export AWS_REGION=eu-west-1 +export AWS_PROFILE=my-profiles +docker compose --build --force-recreate + +# NOTE: This does not work +docker compose --context myecscontext ps + +docker compose up + +``` + + + +## Resources + +* Deploying Docker containers on ECS [here](https://docs.docker.com/cloud/ecs-integration/) diff --git a/94_ecs_compose/docker-compose.yaml b/94_ecs_compose/docker-compose.yaml new file mode 100644 index 0000000..3076587 --- /dev/null +++ b/94_ecs_compose/docker-compose.yaml @@ -0,0 +1,24 @@ +x-aws-default-region: "eu-west-1" +x-aws-region: "eu-west-1" +x-aws-cluster: "arn:aws:ecs:eu-west-1:000000:cluster/ecs-dev-test-fargate" + +services: + nginx: + image: "nginx:1.21.1" + environment: + - VERSION=nginx:1.21.1 + - ANOTHER_VALUE1=ANOTHER_VALUE1 + - ANOTHER_VALUE2=ANOTHER_VALUE2 + - ANOTHER_VALUE3=ANOTHER_VALUE3 + - ANOTHER_VALUE4=ANOTHER_VALUE4 + + + # ports: + # - "8080:80" +# networks: +# - service_bridge + +# networks: +# service_bridge: +# driver: bridge + diff --git a/95_contexts/README.md b/95_contexts/README.md new file mode 100644 index 0000000..a6fa012 --- /dev/null +++ b/95_contexts/README.md @@ -0,0 +1,39 @@ +# README + +Demonstrate `docker contexts` + +Docker contexts are not related to the context we pass as part of the image build. + + +```sh +docker context ls +docker context inspect default + + docker context create --help +docker context create ecs myecscontext + +[ + { + "Name": "myecscontext", + "Metadata": { + "Type": "ecs" + }, + "Endpoints": { + "docker": { + "SkipTLSVerify": false + }, + "ecs": { + "Profile": "myprofile" + } + }, + "TLSMaterial": {}, + "Storage": { +..... + } + } +``` + +## Resources + +https://docs.docker.com/engine/context/working-with-contexts/ + diff --git a/TODO.md b/TODO.md index 7ea0e3a..42e6a80 100644 --- a/TODO.md +++ b/TODO.md @@ -1,5 +1,12 @@ # 📝 TODO +1. containerd on linux +2. podman and podman compose. +3. docker ecs +4. + + + 1. cgroups and namespaces 1. Start a cgroup manually using an unpacked container. 1. Can I use a cgroup command inside a container?