#!/usr/bin/env bash

aws ecr get-login-password --region us-west-2 | docker login --username AWS --password-stdin 038504843107.dkr.ecr.us-west-2.amazonaws.com

export TAG="1.16.0-buster"
docker pull "golang:$TAG"

docker tag "golang:$TAG" "038504843107.dkr.ecr.us-west-2.amazonaws.com/golang:$TAG"
docker tag "golang:$TAG" "038504843107.dkr.ecr.us-west-2.amazonaws.com/golang:1.16"

docker push "038504843107.dkr.ecr.us-west-2.amazonaws.com/golang:$TAG"
docker push "038504843107.dkr.ecr.us-west-2.amazonaws.com/golang:1.16"

