Skip to content

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

@ajeetraina

Description

@ajeetraina

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions