Build and push the application to a Docker registry

Before you can run the application on the cluster, you first need to push the Docker image to the IBM Cloud private container registry.

  1. Set MYPROJECT environment variable. Replace with the name of the application you created in the previous steps.
    Windows
    Bash
    set MYPROJECT=<APP_NAME>
    export MYPROJECT=<APP_NAME>
  2. Set MYNAMESPACE and MYREGISTRY and env vars. Copy and paste these commands.
    Windows
    Bash
    set MYNAMESPACE=think-iks
    set MYREGISTRY=registry.ng.bluemix.net
    export MYNAMESPACE=think-iks 
    export MYREGISTRY=registry.ng.bluemix.net
  3. Build and tag (-t) the docker image
    Windows
    Bash
    docker build . -t %MYREGISTRY%/%MYNAMESPACE%/%MYPROJECT%:v1.0.0
    docker build . -t $MYREGISTRY/$MYNAMESPACE/$MYPROJECT:v1.0.0
  4. Ensure you are logged into the IBM container registry
    ibmcloud cr login
    
  5. Push the docker image to your container registry on IBM Cloud
    Windows
    Bash
    docker push %MYREGISTRY%/%MYNAMESPACE%/%MYPROJECT%:v1.0.0
    docker push $MYREGISTRY/$MYNAMESPACE/$MYPROJECT:v1.0.0

results matching ""

    No results matching ""