I need a simple solution to build a docker image, push it to ECR, and deploy it to ECS.
The final part, which deploys the ECR image to ECS is working. (I’m using a
deploy.py short script that uses Python’s AWS boto3 SDK, found it easier than making the ECS Orb work…)
However, I’m struggling with the first part, need help. I just need to automate the simple
docker tag and
docker push. It’s very simple, but I don’t know what I’m doing wrong.
Can anyone help me? It follows the code, I’m running it locally for debug purposes:
version: '2.1' jobs: build: docker: - image: cimg/python:3.8 environment: AWS_ACCESS_KEY_ID: yadayadayada AWS_SECRET_ACCESS_KEY: yadayadayada AWS_DEFAULT_REGION: yadayadayada steps: - checkout - run: | docker build -t myimg . docker tag myimg:latest asdf.dkr.ecr.asdf.amazonaws.com/asddf:latest docker push asdf.dkr.ecr.asdf.amazonaws.com/asdf:latest pip install boto3 python deploy.py
Learnign CircleCI is really frustrating, no good resources for beginners…
Thanks in advance!