dockersamples / dockersamples/labspace-dhi-node

Step 4 under 03-image-analysis.md - docker rm can't run because Step 2 starts the container in the foreground

Open Beginner friendly
#12 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
0
Forks
5
PR merge metrics
No merged PRs in 30d

Description

In the "Exploring the app" section, Step 2 runs the container in the foreground (no -d flag), which holds the terminal. As a result, Step 4's docker rm -f dhi-demo-app can never be executed in the same terminal, the learner types it, but the shell never processes it because docker run is still attached.

Actual behavior

The docker run process stays attached in the foreground, so Step 4 is only echoed as input and never runs:

coder@992f96951343:~/project$ docker run -p 3050:3000 --name dhi-demo-app demo-node-doi:v1
Server listening on port 3000
docker rm -f dhi-demo-app        # typed by the learner, but never executes — run is attached

The learner is stuck with a blocked terminal and an un-removed container.

Proposed fix

Run the container detached in Step 2 so the terminal stays free and Step 4 works as written:

docker run -d -p 3050:3000 --name dhi-demo-app demo-node-doi:v1

Optionally add a note after Step 2 so learners can still see the startup log:

docker logs dhi-demo-app

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open 03-image-analysis.md and read the “Exploring the app” section, especially Steps 2 and 4. Verify the container command leaves the terminal available for the later removal command, and confirm the documented steps work in sequence; optionally check that the suggested log command is accurate.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, javascript
Domain
devops, documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
82/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.