GitLab CI and Distributed Builds
Building containers with GitLab Runner & AWS Fargate executor

Building containers with GitLab Runner & AWS Fargate executor

7/31/2020 · Elliot Rushton

What this post added

This post introduces a method to build container images using GitLab Runner on AWS Fargate when Docker-in-Docker (DinD) is not supported due to Fargate's lack of privileged mode. It details the architecture overview, prerequisites, and a six-step process involving creating an S3 bucket, an AWS CodeBuild project, building a custom CI container image with AWS CLI and zip, adding a buildspec.yml to the repository, setting up a GitLab CI job to orchestrate the process (zipping build files, uploading to S3, triggering CodeBuild via AWS CLI, and fetching logs), and configuring AWS credentials. The core technical contribution is the orchestration script and CI job configuration that bridges GitLab CI with AWS CodeBuild for container image building.

Read the original post ↗