BLAM Docker Container Building

< All Topics

This guide will go through the steps for building the Docker Containers for the BLAM API, Workflow and other services ready for deploying to a Docker environment.

This is typically performed on a Windows development machine using Powershell.

Configure AWS Connection

$ aws configure

$ blam-containers
$ eu-west-1

Login to AWS

$ aws ecr get-login-password –region eu-west-1 | docker login –username AWS –password-stdin

Build the Containers

BLAM API and Workflow

Change directory to BLAM3/BLAM3.

$ docker build -t api -f .\API\Dockerfile ./
$ docker build -t workflow -f .\Workflow\Dockerfile ./

BLAM Microservices

Change Directory into the BLAM3/Microservices/specific_microservice_directory to build the microservices.

$ docker build -t streaming-server -f .\StreamingServer\Dockerfile ./
$ docker build -t sns-service -f .\AWSSNSService\Dockerfile ./

Recording Microservices

Change Directory into the BLAM3/Microservices/recording_microservice_directory.

Copy the two shared libraries into the Project folder before the build.

$ Copy-Item -Path “..\..\SharedLibraries\QUICToolsAPI\QUICToolsAPI\*” -Destination “.\QUICToolsAPI” -Force -Recurse
$ Copy-Item -Path “..\MicroserviceLibraries\RecordingSchedulerService\*” -Destination “.\RecordingSchedulerService” -Force -Recurse

$ docker build -t quantel-recording-service -f .\QuantelRecordingService\Dockerfile ./

Update the AWS Elastic Container Registry (ECR)

To use the updated Containers in BLAM3 Deployments, they must be pushed into our AWS Elastic Container Registry. The steps below will use the API Container in the examples. The steps are the same for all Containers you are updating and pushing.

Tag the Container

Each build command returns a [CONTAINER_ID] in the Powershell window. Copy this ID and replace the [CONTAINER_ID] in the relevant docker tag command below.

If you are updating the default release Docker Container Images, you can use the default Tag.
$ docker tag [CONTAINER_ID]

If you are building and uploading a non-standard Docker Container Image (for example, from a branch not yet completed and checked in), use a Tag to identify it:
$ docker tag [CONTAINER_ID]

Push the Container Images

$ docker push

Pushing a Tagged Container Image

$ docker push

Full Container List Examples

$ docker tag [CONTAINER_ID]
$ docker tag [CONTAINER_ID]
$ docker tag [CONTAINER_ID]
$ docker tag [CONTAINER_ID]
$ docker tag [CONTAINER_ID]

$ docker push
$ docker push
$ docker push
$ docker push
$ docker push