Difficulty: Beginner
Estimated Time: 10 minutes

In this lab, we will learn about running containers in interactive mode

Interactive Mode

Terminal Access

  • Create a container using the Ubuntu 16.04 image and connect to STDIN and a terminal:

docker run -it ubuntu:16.04 bash

This command runs the container, attaches to standard input stream, and get a pseudo-terminal. For the container process, we specify bash to get the terminal.

  • Create a file using the touch command: touch test && ls

  • You should see the file created in the root directory of the container. Now exit: exit

  • Run the container once again: docker run -it ubuntu:16.04 bash ls

Where did our file go?

Creating Katacoda Scenarios

Thanks for creating Katacoda scenarios. This tab is designed to help you as an author have quick access the information you need when creating scenarios.

This tab will not be visible to users.

Here are some useful links to get you started.

Running Katacoda Workshops

If you are planning to use Katacoda for workshops, please contact [email protected] to arrange capacity.

Debugging Scenarios

Below is the response from any background scripts run or files uploaded. This stream can aid debugging scenarios.

If you still need assistance, please contact [email protected]