curl -o "ecs-cli" "https://amazon-ecs-cli.s3.amazonaws.com/ecs-cli-linux-amd64-latest"
./ecs-cli configure profile --profile-name default --secret-key="<secret key>" --access-key="<access key>"
./ecs-cli configure --cluster=<your ecs cluster> --region <your aws region> --config-name default
./ecs-cli local create --task-def-remote Hello-World:2
version: "3"
build:
steps:
- type: apt-get
packages: ["curl", "apt-transport-https", "ca-certificates"]
- type: apt-get
packages: ["docker-ce", "docker-ce-cli", "containerd.io"]
extra_repositories:
- key_url: https://download.docker.com/linux/ubuntu/gpg
repository: https://download.docker.com/linux/ubuntu
- type: command
command: |
curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
usermod -aG docker devzero
systemctl enable docker.service
systemctl enable containerd.service
directory: /home/devzero
user: root
- type: command
command: |
curl -o "ecs-cli" "https://amazon-ecs-cli.s3.amazonaws.com/ecs-cli-linux-amd64-latest"
chmod +x ./ecs-cli
- type: command
command: |
./ecs-cli configure profile --profile-name default --secret-key="<secret key>" --access-key="<access key>"
./ecs-cli configure --cluster=<your ecs cluster> --region <your aws region> --config-name default