What’s a container? Rubbermaid??

In order for ECS service to run our app, it’ll need an image. A container image is an unchangeable, static file that includes executable code so it can run an isolated process on IT infrastructure. - https://www.techtarget.com/searchitoperations/definition/container-image

This includes an operating system, libraries to interact with the internet (if we require that), helpful CLI tools, and program(s) to run.

Ever heard of dropshipping?


No, I’m not going to break down a course with 5 easy steps on how to start your drop-shipping business but you might see some similarities.

We use our pipeline to handle repetitive tasks that we don’t want to risk ruining ourselves. Bundling our apps (like it already does) and sending artifacts to storage for use (like it already does) is the perfect job for it. We’re just changing our steps.

Prerequisites


A good tool to build and run your containers locally is Docker Desktop. Its a cool platform with views into all your containers, running or not, management of those containers, logs, and more. Its also a must if we’re trying to test our Dockerfile changes below.

Plan


Bundle our storefront as an executable using Next.js config settings.

https://nextjs.org/docs/pages/building-your-application/deploying#docker-image

Write a Dockerfile responsible for building and serving our app.

Update our pipeline to run our Dockerfile and save the image.

And later, we’ll point an ECR repository to our latest artifact