#!/bin/bash

# Configure docker to be able to get images from our ECR repository.
aws ecr get-login-password --region us-west-2 | \
  docker login --username AWS --password-stdin 799890034725.dkr.ecr.us-west-2.amazonaws.com

# Run a prime container in the background, binding the container's port 8080 to the host's port 8080.
docker run \
  -d \
  -p 8080:8080 \
  799890034725.dkr.ecr.us-west-2.amazonaws.com/primes:latest
