DEV Community

cursora
cursora

Posted on

A real Docker exercise from our course platform (try it yourself)

Skip the pitch, here's the exercise

Rather than describe our coding education platform in the abst
ract, I want to show one actual exercise, word for word (trans
lated -- the course itself is Polish-first), from the "Cloud T
echnologies" course. Try it yourself if you want; it only need
s Docker.

The scenario

You are a junior DevOps engineer at a tech company. Your tea
m lead has asked you to start a simple HTTP server in a Docker
container for a test environment. The server must run with a
specific configuration -- verify it using Docker's diagnostic
tools.

Start a container named web_server using the python:3.11-
slim
image, in detached mode. The container should run Python
's built-in HTTP server on port 8000 (command: python3 -m htt
p.server 8000
).

Configuration requirements:

  • Container port 8000 must be accessible on host port 8001
  • Environment variable APP_ENV set to production

If you want to try it cold before reading on: that's the whole
prompt. Here's a solution:

docker run -d \
  --name web_server \
  -p 8001:8000 \
  -e APP_ENV=production \
  python:3.11-slim \
  python3 -m http.server 8000

docker ps
docker inspect web_server
Enter fullscreen mode Exit fullscreen mode

The exercise doesn't stop at "make it run" -- the follow-up as
ks you to explain what each field in docker inspect's output
actually means (State, NetworkSettings.Ports, Config.Env
, etc.), which is the part that actually separates "I copied
a command" from "I understand what's happening."

What's running underneath it

This isn't a fake terminal with pre-recorded output. The actua
l sandbox config for this exercise:

  • Base image: alpine:3.20
  • CPU limit: 0.5 cores
  • Execution mode: isolated VM worker
  • Network access: none by default (no outbound calls unless an exercise specifically opens it)
  • Optional bash setup script runs before the student's first c ommand

Why I'm posting this instead of a feature list

Screenshots of a dashboard don't tell you anything about wheth
er the actual course content is any good. One real exercise, r
eproduced exactly, does. This is one lesson out of many in one
course out of 27 currently in the catalog at cursora.org. Happy to answer questions about the sandbo
x architecture or the exercise design specifically.

Top comments (1)

Collapse
 
marcusykim profile image
Marcus Kim

The follow-up on docker inspect is the strongest part of this exercise: asking learners to explain State, NetworkSettings.Ports, and Config.Env tests whether they understand the container rather than just memorizing docker run. The isolated VM, Alpine 3.20 base, half-CPU limit, and network-disabled default also make the sandbox constraints concrete instead of hiding them behind a dashboard. One useful next-level distinction for course designers is separating configuration that changes behavior from configuration that proves wiring; APP_ENV=production is valuable here as an inspection check, even though Python's built-in server.