Deploy Docker Using REST API

This tutorial demonstrates how to deploy a Docker job using the Apcera REST API.


  1. Target your cluster log in using APC.

  2. Open the .apc file using a text editor.

  3. Copy the Bearer token to a temporary file.

  4. Create the JSON application payload.

    Copy the JSON below to a text file named deis.json and save it to a known local direcctory. Update the SUBDOMAIN in the "routes" URL to match your cluster and, if necessary, the "job_fqn" to match your default namespace where you have policy.

  5. Deploy the Docker job using cURL.

    CD to where you saved the desi.json file. Provide the Bearer token and update the SUBDOMAIN in the URL.

     curl -X POST --data "@deis.json" -H "Content-Type: application/json" -H "Authorization: Bearer <token>" ""
  6. Verify the response.

    A successful POST returns a "location" object with the UUID for the job. For example:

  7. Check the status of the Docker job.

    Do a GET on the "tasks" endpoint with the UUID of the job. For example:

     curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer <token>" ""
  8. Verify deployment by going to the route URL with a browser.