For the complete documentation index, see llms.txt. This page is also available as Markdown.

Pushing Containers to the ECR

Provides technical information required to push containers to the Amazon ECR (Elastic Container Registry)

Prerequisites

Complete the following before you begin.

  • Before starting, complete all steps in FCP Client Installation and Environment Configuration. This will ensure that your dependencies have been installed, your AWS CLI has been configured and you are able to connect to your specific ECR workspace.

  • Make sure that the docker daemon has been started as a prerequisite to pushing containers to the ECR.

  • Make note of the following:

    • For both methods below, the variable myapplication is the name you are assigning your container. It can be whatever you choose to make it, but it must be unique to each container that is pushed to your ECR. We recommend adding some kind of versioning to your container name.

    • Your workgroup_repository_name can be found within your user profile. Read Viewing and Adjusting Your Settings for more details.

Production Environment URIs

For users in our production environments pushing container images to their workgroup's repo on Rhino FCP, here are the URIs they need to use for AWS and GCP.

In environments using a Rhino Orchestrator on AWS (currently dashboard.rhinohealth.com):

{AWS_ACCOUNT_ID}.dkr.ecr.{AWS_REGION}.amazonaws.com/{WORKGROUP_REPO_NAME}:{TAG}

In environments using a Rhino Orchestrator on GCP (currently dashboard.rhinofcp.com):

{GCP_REGION}-docker.pkg.dev/{GCP_PROJECT_ID}/{WORKGROUP_REPO_NAME}/images:{TAG}

About Variables

Here are some details about the variables in the above templates:

  • AWS_ACCOUNT_ID: Our production AWS account ID: 865551847959

  • AWS_REGION: Our production AWS resources are in: us-east-1

  • GCP_REGION: Our production GCP resources are in: europe-west4

  • GCP_PROJECT_ID: Our production GCP project ID: rhino-health-prod

  • WORKGROUP_REPO_NAME: Configured for each workgroup in our database, and available for users in our dashboard under "Settings" -> "Containers & Artifacts".

  • TAG: Arbitrarily chosen by users to label each container image. Unique in each workgroup's repo, and immutable, i.e. after pushing one container image with a given tag, no other may be pushed with that tag.

Examples

The following examples show how to build and push containers, and also list and pull images.

The docker-push.sh script can be found in the user-resources GitHub repository under the rhino_utils folder. Using a terminal or command line navigate to the directory where your Dockerfile and other relevant files are found. Copy the docker-push.sh script into that folder and make it executable by running

cd to the directory where your Dockerfile and other relevant code files are found.

cd to the directory where your Dockerfile and other relevant files are found.

Build Container Command

Note: the period at the end of the above build command.

Push Container Command

List Local Images Example

List Remote Images Example

Pull a Container Image from a Remote Repository Example

Last updated

Was this helpful?