Retrieving Logs for a Container Instance

You can retrieve logs for a container instance.

    1. Navigate to the Container instances list page. If you need help finding the list page, see Listing Container Instances.
    2. Select the name of the active container instance that you want to work with. If you don't see the container instance, ensure that you're in the correct compartment.
    3. Select the Containers tab.
    4. Select the container to retrieve logs from.
    5. From the Actions menu, select View logs.
  • Use the retrieve-logs command and required parameters to retrieve logs from a container instance:

    oci container-instances container retrieve-logs --container-id "$id" --file -
    Note

    To use this command, replace id with the ID of your resource. The dash at the end of the command (-) outputs the logs and can be replaced with a file name.

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • Run the RetrieveLogs operation to retrieve logs from a container instance.