Containers

In this article


Overview

Containers are service instances that run in your cluster. They are the result of successfully configuring a service to operate on your cluster. The number of containers actively running and available in your cluster is specified by the replicas value in your service's configuration.

Logs

When a container is running, its logs can be accessed in a few steps.

  1. Navigate to the cluster running the container of interest.
  2. Click the service's name to open the service details page that's being run in the container.
  3. Identify the container whose logs you'd like to view.
  4. Click the "Options" selector button for the container, and click the "Logs" button.

You will see web terminal open with the container's logs captured over the lifecycle of the container.

Open shell

When a container is running, you can open a shell to communicate with the service. This can be done in a few steps.

  1. Navigate to the cluster running the container of interest.
  2. Click the service's name to open the service details page that's being run in the container.
  3. Identify the container you'd like to communicate with.
  4. Click the "Options" selector button for the container, and click the "Start shell" button.

You will see a web terminal open ready to receive commands.

Run commands

You can execute a command on a running container. For example, most images include a shell which can be accessed by executing the bash command. You can use this, for example, to debug issues with your container or app, such as manually running database commands to check a database connection.

Execute a command opens a terminal in your web browser and runs the command, showing any output. An interactive terminal is shown if the command is interactive.

Note: This is the only way to open a terminal to a container as MedStack Control does not support SSH access. For more information, see https://docs.docker.com/engine/reference/commandline/exec/.

  1. Navigate to the cluster running the container of interest.
  2. Click the service's name to open the service details page that's being run in the container.
  3. Identify the container you'd like to execute the command on.
  4. Click the "Options" selector button for the container, and click the "Execute cmd" button.

You will see a web terminal open with the container's response to the command.

Stop containers without deleting a service

Sometimes it's desirable to destroy/stop all containers without deleting the service configuration in Docker. This can be done by setting the service replicas to 0. In order to start containers again, increase the replicas to greater than 0.

  1. Navigate to the cluster running the service of interest.
  2. Click the service's name to open the service details page that's being run in the container.
  3. Click the "Update" button to modify the service configuration.
  4. Change the "Replicas" count to zero.
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Submit a request for support Submit a request for support