Difficulty: Beginner
Estimated Time: 10 minutes

See the differences when running something in a container than running it "normally".

A process running in a container is isolated in many perspectives:

  • Cgroup
  • File system
  • Network namespace
  • etc.

In this scenario we're going to use a docker image called alpine.

We'll come to the real meaning of a image in a later scenario. For now it should be enough knowing that everything starts with "docker run alpine:latest" is run inside a container.

We've covered some (probably) most widely mentioned perspectives of how a container can provide isolation on processes.

  • Cgroup
  • File system
  • Network namespace

There're actually more to explore, for example the user ID namespace. We'll discover more about it in the next scenario.

I. Container: First Contact

Step 1 of 4

1. Create your first container

A simple command

First let's run a simplest shell command: echo "Hello Docker!"

Now we run the same command again, but with Docker: docker run alpine:latest echo "Hello Docker!"

Doesn't look different in anyway, does it? That's how a container is supposed to be, just to wrap and isolate a process, without changing how the process behaves.

But what's the point of all this if running inside a container doesn't make any difference?

In the following steps we're going to run something different, to see a bit more.

This tab will not be visible to users and provides only information to help authors when creating content.

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.

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]