Stopping a Container Instance

Stop a container instance.

Resource Billing for Stopped Instances

For container instances, billing depends on the shape that you use to create the container instance. Container instances use standard shapes which pause billing when a container instance stops. However, stopped and failed instances continue to count toward your service limits.

  • Note

    When you stop a container instance, any data on the ephemeral storage is lost.
    1. Open the navigation menu and click Developer Services. Under Containers & Artifacts, click Container Instances.

    2. Click the container instance that you're interested in.

    3. Click Stop.

      The container instance stops all containers before stopping the container instance itself.

    4. Click Stop instance.

    Note

    When you create a container, you can set the amount of time that the timeout allows on the container instance. If you don't set a value, the default value is 0 seconds. If containers take more time to stop than the timeout value allows, the service terminates them.
  • Use the oci container-instances container-instance stop command to stop a container instance.

    To use this command, replace id with your resource.

    $ id=ocid1.computecontainerinstance.oc1.iad.example
    $ oci container-instances container-instance stop --container-instance-id "$id"

    For a complete list of flags and variable options for CLI commands, see the Command Line Reference.

  • For information about using the API and signing requests, see REST API documentation and Security Credentials. For information about SDKs, see Software Development Kits and Command Line Interface.

    To manage the lifecycle state of container instances, use these operations: