Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions 94_ecs_compose/README.md
Original file line number Diff line number Diff line change
@@ -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/)
24 changes: 24 additions & 0 deletions 94_ecs_compose/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -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

39 changes: 39 additions & 0 deletions 95_contexts/README.md
Original file line number Diff line number Diff line change
@@ -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/

7 changes: 7 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -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?
Expand Down