Docker Image Deployment

Instructions below describes how you can deploy a docker image based application using shipa.

Creating a Sample Application using docker image

As part of this example, we create an application called bulletinboard:

shipa app deploy bulletinboard -t shipa-admin-team -k shipa-framework -i docker.io/shipasoftware/bulletinboard:1.0

Once the command above has been executed, all available applications using the app list command are listed.

shipa app list
+---------------+---------------------------+--------------------------------------+
| Application   |Status     | Shipa Managed | Address                              |
+---------------+-------------------------+----------------------------------------+
| bulletinboard | 1 running |     true      | bulletinboard.192.168.0.4.shipa.cloud|
+---------------+-------------------------+----------------------------------------+

You can deploy an existing Docker image using Shipa's dashboard or the Shipa CLI as shown below:

The application is available through the Address provided in the output of the app list command once the deployment is complete.

Private Registry

For private registries, in the UI, you can specify a registry username and registry token/passowrd in the Application Deployment prompts. If leveraging the CLI, can pass the --private-image flag and the CLI will interactivly prompt you for the credentials or can export those into environment variables.

export SHIPA_REGISTRY_USERNAME="arn:aws:iam::123456789:user/bacon"
export SHIPA_REGISTRY_PASSWORD="abcdefg#/abcdefg#/"
shipa app deploy -i *.dkr.ecr.us-east-1.amazonaws.com/boardandco/bulletinboard:1.0 -a bulletinboard --private-image

Alternative you can setup docker credentials for set of frameworks. This allows application deployment from private registries without providing credentials.

shipa credential add dockercreds --provider docker --framework framework1 --path ~/.docker/config.json

Once setup deploy images from your private docker repositories whose secrets are defined in docker config.json. Here is a sample docker config.json for docker.io, Google container registry (GCR), github container registry (GHCR), and Amazon container registry (ECR):

{
    "auths": {
        "AWS_ACCOUNT_ID.dkr.ecr.AWS_REGION.amazonaws.com": {
            "auth": "base64-secret"
        },
        "gcr.io": {
            "auth": "base64-secret"
        },
        "ghcr.io": {
            "auth": "base64-secret"
        },
        "https://index.docker.io/v1/": {
            "auth": "token"
        },
        "vivek7.jfrog.io": {}
    },
    "credHelpers": {
        "asia.gcr.io": "gcloud",
        "eu.gcr.io": "gcloud",
        "gcr.io": "gcloud",
        "marketplace.gcr.io": "gcloud",
        "staging-k8s.gcr.io": "gcloud",
        "us.gcr.io": "gcloud"
    },
    "experimental": "disabled",
    "stackOrchestrator": "swarm",
    "currentContext": "desktop-linux"
}

Did this page help you?