OS | Command |
---|---|
macOS | gunzip cpln_app.tgz && open cpln_app.tar |
Linux | tar -xvf cpln_app.tgz |
Windows 10/11 (PowerShell) | Expand-Archive cpln_app.zip |
cpln_app
directory to containerize the application:quick-start-4
and the tag is 0.1
. You can build and push multiple versions with the same name and
different tags (e.g., 0.2, 0.3, etc.).
Dockerfile
. The cpln image build
command uses Buildpacks to
scan the application and automatically build the image. If your application has an existing Dockerfile
, the command
will use that file to containerize the application.cpln location get --org ORG_NAME
.--name
flag, choose an appropriate name for the workload. It will be used when generating the endpoint URL.
For the --image
flag, use the name of the image that was created in step 1. Prefix the image name with //image/
to have the platform pull the image from your Org’s private registry.
For the --gvc
flag, use the GVC name created in step 2 or from the previous quick start.
For the --port
flag, use port 8080 which is the port the application exposes.
The command uses the --public
flag which will automatically set the firewall rules for this Workload to allow inbound and outbound Internet traffic.
CPLN_
are added by Control Plane and can be used by your application.
For example, the variable CPLN_LOCATION
will be the location where the Workload was served from. Since we configured the GVC with two locations, this variable can change depending on the location of the caller since the endpoint URL is DNS geo-routed to the nearest healthy location.
For more details on the built-in variables, visit the Workload Environment Variables reference page.