Let's get docker up and running
$ cp .env.example .env
$ composer install
$ art key:generate
$ art migrate
$ docker-compose up -d nginx mysql
$ docker-compose exec workspace bash
$ docker-compose exec nginx bash
$ docker-compose exec mysql bash
$ docker-compose down
$ docker exec -it [container process id] bash
Install aws cli first - https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html And create an IAM user with AdminstratorAccess
$ aws configure
$ (aws ecr get-login --no-include-email --region eu-west-1) > bash
$ docker build --file docker/nginx/Dockerfile -t sticky_nginx ./
$ docker build --file Dockerfile-ecs -t sticky_workspace_ecs ./
$ ecs-cli push sticky_nginx
$ ecs-cli push sticky_workspace_ecs
Then put repo names in docker-compose-esc.yml
$ ecs-cli up --launch-type FARGATE --cluster sticky # --force
// Copy the 2 subnets and 1 security group created by Cloudformation to ecs-params.yml
$ ecs-cli compose --file docker-compose-ecs.yml --project-name sticky --ecs-params docker/ecs-params.yml up --launch-type FARGATE --create-log-groups
Via web ui for now
docker container ls
docker ps
docker images
$ aws ecr get-login --region eu-west-1 --no-include-email > bash (or copy & paste if that doesnt work)
$ docker pull 292099829357.dkr.ecr.eu-west-1.amazonaws.com/sticky_workspace:latest
docker rm $(docker ps -a -q)
docker rmi -f $(docker images -q)