Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Alternatively, after preparing your Dockerfile and start_app script, you can build the Docker image yourself and publish the image to API Runtime Services: 

  1. Build the Docker image:

    Code Block
    languagebash
    $ cd appctest
    $ docker build -t appctestimage .
    # Double check the image presents locally
    $ docker images |grep appctestimage
    appctestimage               latest              869918dab71b        43 minutes ago      277 MB
  2. Next, publish the image directly. Ensure that you provide the app version and name and image name by using the --app-versionappname, and --image flags:

    Code Block
    languagebash
    $ cd appctest
    $ appc publish --app-version 1.0.0 --image appctestimage appctest
  3. If you need to scale up the number of servers, execute these commands:

    Code Block
    languagebash
    # Set maximum number of containers allowed for appctest
    $ appc cloud config appctest --maxsize <size>
    # Set current number of containers for appctest as long as the cluster has enough resource)
    $ appc cloud config appcteest --minsize <size>

...