Dockerise and Debug Your AI App
Package the AI application in Docker, inspect logs from a real broken container, fix the command, and rebuild.
What you'll build
Before You Build
2 quick questions. This is diagnostic only — it does not block the lesson.
Where do you inspect a crashed container message?
What does .dockerignore protect?
Mission
Package the AI application in Docker, inspect logs from a real broken container, fix the command, and rebuild.
Understand
Containers make the application environment repeatable, but they do not remove dependencies or mistakes. Observable exits, logs, and image configuration make failures diagnosable.
Build
Create each Docker file, save it, build the application image, and run it.
The files make the application environment repeatable and prepare a controlled failure for debugging.
~/enjyra-free-ai.touch Dockerfile
code Dockerfiletouch Dockerfile
code Dockerfileif (-not (Test-Path "Dockerfile")) { New-Item -ItemType File -Path "Dockerfile" | Out-Null }
code "Dockerfile"Before You Run
- Your terminal is open in ~/enjyra-free-ai.
- Docker Desktop or Docker Engine is running.
- Visual Studio Code is installed; the optional code shell command is available, or you can open the file manually.
Why You're Running This
Dockerfile is the project’s dockerfile file at ~/enjyra-free-ai/Dockerfile. It must exist before you can paste the supplied content. The commands create its folder when needed, create the file, and open it in VS Code; the next stage tells you what to paste and reminds you to save it.
Command Breakdown
touch / New-Item File- Creates an empty file at the requested path without requiring code to exist first.
code- Opens the file or folder in Visual Studio Code from the terminal.
Expected Result
Dockerfile
Dockerfile exists and is ready for the supplied content.What Changed
BeforeDockerfile may not exist yet, or may still contain its previous content.
AfterDockerfile now exists in the lesson workspace and is ready for the next instruction.
Verify It
macOSls -l Dockerfile
Linuxls -l Dockerfile
Windows PowerShellGet-Item "Dockerfile"
Confirm the file exists at the expected path.
If It Fails
- Check that the terminal is in the lesson project, the path spelling is exact, and VS Code is installed. If the code command is unavailable, use File → Open Folder in VS Code.
If code is unavailable, open VS Code, choose File → Open Folder, select enjyra-free-ai, then create Dockerfile in the Explorer.
Dockerfile.FROM python:3.12.7-slim-bookworm
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt && useradd --create-home --uid 10001 enjyra
COPY --chown=enjyra:enjyra app ./app
COPY --chown=enjyra:enjyra docs ./docs
USER enjyra
CMD ["python3", "app/rag.py", "How many holiday days can employees carry over?"]
Save before continuing: press Cmd + S on macOS or Ctrl + S on Linux and Windows.
cat Dockerfilecat DockerfileGet-Content "Dockerfile"Before You Run
- Your terminal is open in ~/enjyra-free-ai.
- Docker Desktop or Docker Engine is running.
Why You're Running This
Reading Dockerfile back from disk proves that the dockerfile content was saved at the correct path, rather than remaining only in an unsaved editor tab.
Command Breakdown
cat / Get-Content- Reads the saved file and prints its contents so you can verify it.
Expected Result
The terminal prints the complete content you pasted into Dockerfile.What Changed
BeforeThe current state has not yet been checked.
AfterNo persistent state changed; the command printed evidence you can compare with the expected result.
Verify It
macOScat Dockerfile
Linuxcat Dockerfile
Windows PowerShellGet-Content "Dockerfile"
Run the command and compare its output with the Expected Result block.
If It Fails
- Save the file, confirm the filename and capitalisation, and check the current folder with pwd on macOS/Linux or Get-Location on Windows.
If it fails
Check that your terminal is in ~/enjyra-free-ai, the filename and capitalisation match exactly, and the file was saved. Use pwd on macOS/Linux or Get-Location on Windows to check your current folder.
~/enjyra-free-ai.touch .dockerignore
code .dockerignoretouch .dockerignore
code .dockerignoreif (-not (Test-Path ".dockerignore")) { New-Item -ItemType File -Path ".dockerignore" | Out-Null }
code ".dockerignore"Before You Run
- Your terminal is open in ~/enjyra-free-ai.
- Docker Desktop or Docker Engine is running.
- Visual Studio Code is installed; the optional code shell command is available, or you can open the file manually.
Why You're Running This
.dockerignore is the project’s text file at ~/enjyra-free-ai/.dockerignore. It must exist before you can paste the supplied content. The commands create its folder when needed, create the file, and open it in VS Code; the next stage tells you what to paste and reminds you to save it.
Command Breakdown
touch / New-Item File- Creates an empty file at the requested path without requiring code to exist first.
code- Opens the file or folder in Visual Studio Code from the terminal.
Expected Result
.dockerignore
.dockerignore exists and is ready for the supplied content.What Changed
Before.dockerignore may not exist yet, or may still contain its previous content.
After.dockerignore now exists in the lesson workspace and is ready for the next instruction.
Verify It
macOSls -l .dockerignore
Linuxls -l .dockerignore
Windows PowerShellGet-Item ".dockerignore"
Confirm the file exists at the expected path.
If It Fails
- Check that the terminal is in the lesson project, the path spelling is exact, and VS Code is installed. If the code command is unavailable, use File → Open Folder in VS Code.
If code is unavailable, open VS Code, choose File → Open Folder, select enjyra-free-ai, then create .dockerignore in the Explorer.
.dockerignore..git
.venv
.env
__pycache__
*.pyc
*.log
Save before continuing: press Cmd + S on macOS or Ctrl + S on Linux and Windows.
cat .dockerignorecat .dockerignoreGet-Content ".dockerignore"Before You Run
- Your terminal is open in ~/enjyra-free-ai.
- Docker Desktop or Docker Engine is running.
Why You're Running This
Reading .dockerignore back from disk proves that the text content was saved at the correct path, rather than remaining only in an unsaved editor tab.
Command Breakdown
cat / Get-Content- Reads the saved file and prints its contents so you can verify it.
Expected Result
The terminal prints the complete content you pasted into .dockerignore.What Changed
BeforeThe current state has not yet been checked.
AfterNo persistent state changed; the command printed evidence you can compare with the expected result.
Verify It
macOScat .dockerignore
Linuxcat .dockerignore
Windows PowerShellGet-Content ".dockerignore"
Run the command and compare its output with the Expected Result block.
If It Fails
- Save the file, confirm the filename and capitalisation, and check the current folder with pwd on macOS/Linux or Get-Location on Windows.
If it fails
Check that your terminal is in ~/enjyra-free-ai, the filename and capitalisation match exactly, and the file was saved. Use pwd on macOS/Linux or Get-Location on Windows to check your current folder.
~/enjyra-free-ai.touch Dockerfile.broken
code Dockerfile.brokentouch Dockerfile.broken
code Dockerfile.brokenif (-not (Test-Path "Dockerfile.broken")) { New-Item -ItemType File -Path "Dockerfile.broken" | Out-Null }
code "Dockerfile.broken"Before You Run
- Your terminal is open in ~/enjyra-free-ai.
- Docker Desktop or Docker Engine is running.
- Visual Studio Code is installed; the optional code shell command is available, or you can open the file manually.
Why You're Running This
Dockerfile.broken is the project’s dockerfile file at ~/enjyra-free-ai/Dockerfile.broken. It must exist before you can paste the supplied content. The commands create its folder when needed, create the file, and open it in VS Code; the next stage tells you what to paste and reminds you to save it.
Command Breakdown
touch / New-Item File- Creates an empty file at the requested path without requiring code to exist first.
code- Opens the file or folder in Visual Studio Code from the terminal.
Expected Result
Dockerfile.broken
Dockerfile.broken exists and is ready for the supplied content.What Changed
BeforeDockerfile.broken may not exist yet, or may still contain its previous content.
AfterDockerfile.broken now exists in the lesson workspace and is ready for the next instruction.
Verify It
macOSls -l Dockerfile.broken
Linuxls -l Dockerfile.broken
Windows PowerShellGet-Item "Dockerfile.broken"
Confirm the file exists at the expected path.
If It Fails
- Check that the terminal is in the lesson project, the path spelling is exact, and VS Code is installed. If the code command is unavailable, use File → Open Folder in VS Code.
If code is unavailable, open VS Code, choose File → Open Folder, select enjyra-free-ai, then create Dockerfile.broken in the Explorer.
Dockerfile.broken.FROM enjyra/free-docker-labs:08-docker-debug-v6.0.0
CMD ["python3", "app/missing.py"]
Save before continuing: press Cmd + S on macOS or Ctrl + S on Linux and Windows.
cat Dockerfile.brokencat Dockerfile.brokenGet-Content "Dockerfile.broken"Before You Run
- Your terminal is open in ~/enjyra-free-ai.
- Docker Desktop or Docker Engine is running.
Why You're Running This
Reading Dockerfile.broken back from disk proves that the dockerfile content was saved at the correct path, rather than remaining only in an unsaved editor tab.
Command Breakdown
cat / Get-Content- Reads the saved file and prints its contents so you can verify it.
Expected Result
The terminal prints the complete content you pasted into Dockerfile.broken.What Changed
BeforeThe current state has not yet been checked.
AfterNo persistent state changed; the command printed evidence you can compare with the expected result.
Verify It
macOScat Dockerfile.broken
Linuxcat Dockerfile.broken
Windows PowerShellGet-Content "Dockerfile.broken"
Run the command and compare its output with the Expected Result block.
If It Fails
- Save the file, confirm the filename and capitalisation, and check the current folder with pwd on macOS/Linux or Get-Location on Windows.
If it fails
Check that your terminal is in ~/enjyra-free-ai, the filename and capitalisation match exactly, and the file was saved. Use pwd on macOS/Linux or Get-Location on Windows to check your current folder.
cd ~/enjyra-free-ai && docker build -t enjyra/free-docker-labs:08-docker-debug-v6.0.0 .cd ~/enjyra-free-ai && docker build -t enjyra/free-docker-labs:08-docker-debug-v6.0.0 .Set-Location $HOME\enjyra-free-ai
docker build -t enjyra/free-docker-labs:08-docker-debug-v6.0.0 .Before You Run
- Your terminal is open in ~/enjyra-free-ai.
- Docker Desktop or Docker Engine is running.
Why You're Running This
Docker needs to turn the project’s build instructions into a runnable local image.
Command Breakdown
cd / Set-Location- Changes the terminal’s current working directory before the next command runs.
docker build- Reads the Dockerfile, builds its layers, and tags the resulting local image.
&&- Runs the next command only when the previous command succeeds.
-t enjyra/free-docker-labs:08-docker-debug-v6.0.0- Assigns the resulting image its ENJYRA repository name and lesson version tag.
.- Uses the current folder as Docker’s build context.
Expected Result
naming to ... enjyra/free-docker-labs:08-docker-debug-v6.0.0
Docker Desktop shows the exact local tag.What Changed
BeforeNo newly verified image exists for the current source and Dockerfile.
AfterDocker has created or refreshed the local image with the requested tag.
Verify It
macOSdocker images
Linuxdocker images
Windows PowerShelldocker images
Confirm the newly built image and tag are present.
If It Fails
- No such file or directory → verify the current folder and the path spelling.
- Permission denied → work inside your own lesson folder and confirm it is writable.
- Docker daemon not running → start Docker Desktop or Docker Engine, then retry.
naming to ... enjyra/free-docker-labs:08-docker-debug-v6.0.0If it fails
command not found → verify the required tool is installed and reopen the terminal.No such file or directory → check your current folder with pwd or Get-Location.Permission denied → confirm the lesson workspace is writable.docker run --rm --name enjyra-v6-docker-debug-08 --add-host host.docker.internal:host-gateway -e OLLAMA_URL=http://host.docker.internal:11434 enjyra/free-docker-labs:08-docker-debug-v6.0.0docker run --rm --name enjyra-v6-docker-debug-08 --add-host host.docker.internal:host-gateway -e OLLAMA_URL=http://host.docker.internal:11434 enjyra/free-docker-labs:08-docker-debug-v6.0.0docker run --rm --name enjyra-v6-docker-debug-08 --add-host host.docker.internal:host-gateway -e OLLAMA_URL=http://host.docker.internal:11434 enjyra/free-docker-labs:08-docker-debug-v6.0.0Before You Run
- Your terminal is open in Current lesson workspace.
- Docker Desktop or Docker Engine is running.
Why You're Running This
The service must be running before the lesson can connect to or test it.
Command Breakdown
docker run- Creates and starts a container from the named image using the supplied ports, environment values, and runtime options.
--rm- Automatically removes the temporary container after it stops.
--name enjyra-v6-docker-debug-08- Assigns a predictable lesson-scoped name so the container can be inspected or removed safely.
--add-host host.docker.internal:host-gateway- Adds the host mapping the container needs to reach a service running on the learner’s machine.
-e OLLAMA_URL=http://host.docker.internal:11434- Supplies this environment value to the process inside the container.
enjyra/free-docker-labs:08-docker-debug-v6.0.0- Names the verified ENJYRA lesson image and its pinned lesson version.
Expected Result
Source: handbook.txt
The application runs from the container and returns a grounded answer.What Changed
BeforeThe requested local service or lab containers are not yet confirmed running.
AfterThe local service or lab containers are running in the background and can be verified.
Verify It
macOSdocker ps
Linuxdocker ps
Windows PowerShelldocker ps
Confirm the expected container is listed as running or healthy.
If It Fails
- No such file or directory → verify the current folder and the path spelling.
- Permission denied → work inside your own lesson folder and confirm it is writable.
- Docker daemon not running → start Docker Desktop or Docker Engine, then retry.
Source: handbook.txtIf it fails
command not found → verify the required tool is installed and reopen the terminal.No such file or directory → check your current folder with pwd or Get-Location.Permission denied → confirm the lesson workspace is writable.The Docker files exist and the working image returns a grounded answer.
Break
cd ~/enjyra-free-ai && docker build -f Dockerfile.broken -t enjyra/free-docker-labs:08-broken-v6.0.0 . && docker run --name enjyra-v6-broken-08 enjyra/free-docker-labs:08-broken-v6.0.0cd ~/enjyra-free-ai && docker build -f Dockerfile.broken -t enjyra/free-docker-labs:08-broken-v6.0.0 . && docker run --name enjyra-v6-broken-08 enjyra/free-docker-labs:08-broken-v6.0.0Set-Location $HOME\enjyra-free-ai
docker build -f Dockerfile.broken -t enjyra/free-docker-labs:08-broken-v6.0.0 .
if ($LASTEXITCODE -eq 0) { docker run --name enjyra-v6-broken-08 enjyra/free-docker-labs:08-broken-v6.0.0 }Before You Run
- Your terminal is open in ~/enjyra-free-ai.
- Docker Desktop or Docker Engine is running.
Why You're Running This
The service must be running before the lesson can connect to or test it.
Command Breakdown
cd / Set-Location- Changes the terminal’s current working directory before the next command runs.
docker build- Reads the Dockerfile, builds its layers, and tags the resulting local image.
docker run- Creates and starts a container from the named image using the supplied ports, environment values, and runtime options.
&&- Runs the next command only when the previous command succeeds.
--name enjyra-v6-broken-08- Assigns a predictable lesson-scoped name so the container can be inspected or removed safely.
enjyra/free-docker-labs:08-broken-v6.0.0- Names the verified ENJYRA lesson image and its pinned lesson version.
-t enjyra/free-docker-labs:08-broken-v6.0.0- Assigns the resulting image its ENJYRA repository name and lesson version tag.
.- Uses the current folder as Docker’s build context.
Expected Result
can't open file '/app/app/missing.py'
The container exits because its configured startup file does not exist.What Changed
BeforeThe requested local service or lab containers are not yet confirmed running.
AfterThe local service or lab containers are running in the background and can be verified.
Verify It
macOSdocker ps
Linuxdocker ps
Windows PowerShelldocker ps
Confirm the expected container is listed as running or healthy.
If It Fails
- No such file or directory → verify the current folder and the path spelling.
- Permission denied → work inside your own lesson folder and confirm it is writable.
- Docker daemon not running → start Docker Desktop or Docker Engine, then retry.
can't open file '/app/app/missing.py'If it fails
command not found → verify the required tool is installed and reopen the terminal.No such file or directory → check your current folder with pwd or Get-Location.Permission denied → confirm the lesson workspace is writable.Debug
docker ps -a --filter name=enjyra-v6-broken-08 && docker logs enjyra-v6-broken-08 && docker inspect enjyra-v6-broken-08 --format "{{json .Config.Cmd}}"docker ps -a --filter name=enjyra-v6-broken-08 && docker logs enjyra-v6-broken-08 && docker inspect enjyra-v6-broken-08 --format "{{json .Config.Cmd}}"docker ps -a --filter name=enjyra-v6-broken-08
docker logs enjyra-v6-broken-08
docker inspect enjyra-v6-broken-08 --format "{{json .Config.Cmd}}"Before You Run
- Your terminal is open in Current lesson workspace.
- Docker Desktop or Docker Engine is running.
Why You're Running This
This checks the current state without changing it, so you can verify the previous action worked.
Command Breakdown
docker ps- Inspects or interacts with local Docker state without using a cloud service.
docker logs- Inspects or interacts with local Docker state without using a cloud service.
docker- Runs the docker tool with the shown arguments to complete this lesson step.
&&- Runs the next command only when the previous command succeeds.
Expected Result
Exited ... missing.py ...
State, logs, and configured CMD agree on the root cause.What Changed
BeforeThe current state has not yet been checked.
AfterNo persistent state changed; the command printed evidence you can compare with the expected result.
Verify It
macOSdocker ps -a --filter name=enjyra-v6-broken-08 && docker logs enjyra-v6-broken-08 && docker inspect enjyra-v6-broken-08 --format "{{json .Config.Cmd}}"
Linuxdocker ps -a --filter name=enjyra-v6-broken-08 && docker logs enjyra-v6-broken-08 && docker inspect enjyra-v6-broken-08 --format "{{json .Config.Cmd}}"
Windows PowerShelldocker ps -a --filter name=enjyra-v6-broken-08
docker logs enjyra-v6-broken-08
docker inspect enjyra-v6-broken-08 --format "{{json .Config.Cmd}}"
Run the command and compare its output with the Expected Result block.
If It Fails
- No such file or directory → verify the current folder and the path spelling.
- Permission denied → work inside your own lesson folder and confirm it is writable.
- Docker daemon not running → start Docker Desktop or Docker Engine, then retry.
Exited ... missing.py ...If it fails
command not found → verify the required tool is installed and reopen the terminal.No such file or directory → check your current folder with pwd or Get-Location.Permission denied → confirm the lesson workspace is writable.Improve
Use OBSERVE → INSPECT → HYPOTHESISE → TEST → FIX → VERIFY. Remove only the named broken container and tag; never use a global prune.
Verify
docker rm enjyra-v6-broken-08 && docker run --rm --name enjyra-v6-docker-debug-08 --add-host host.docker.internal:host-gateway -e OLLAMA_URL=http://host.docker.internal:11434 enjyra/free-docker-labs:08-docker-debug-v6.0.0docker rm enjyra-v6-broken-08 && docker run --rm --name enjyra-v6-docker-debug-08 --add-host host.docker.internal:host-gateway -e OLLAMA_URL=http://host.docker.internal:11434 enjyra/free-docker-labs:08-docker-debug-v6.0.0docker rm enjyra-v6-broken-08
if ($LASTEXITCODE -eq 0) { docker run --rm --name enjyra-v6-docker-debug-08 --add-host host.docker.internal:host-gateway -e OLLAMA_URL=http://host.docker.internal:11434 enjyra/free-docker-labs:08-docker-debug-v6.0.0 }Before You Run
- Your terminal is open in Current lesson workspace.
- Docker Desktop or Docker Engine is running.
Why You're Running This
The service must be running before the lesson can connect to or test it.
Command Breakdown
docker- Runs the docker tool with the shown arguments to complete this lesson step.
docker run- Creates and starts a container from the named image using the supplied ports, environment values, and runtime options.
&&- Runs the next command only when the previous command succeeds.
--rm- Automatically removes the temporary container after it stops.
--name enjyra-v6-docker-debug-08- Assigns a predictable lesson-scoped name so the container can be inspected or removed safely.
--add-host host.docker.internal:host-gateway- Adds the host mapping the container needs to reach a service running on the learner’s machine.
-e OLLAMA_URL=http://host.docker.internal:11434- Supplies this environment value to the process inside the container.
enjyra/free-docker-labs:08-docker-debug-v6.0.0- Names the verified ENJYRA lesson image and its pinned lesson version.
Expected Result
Source: handbook.txt
The corrected image command runs successfully.What Changed
BeforeThe requested local service or lab containers are not yet confirmed running.
AfterThe local service or lab containers are running in the background and can be verified.
Verify It
macOSdocker ps
Linuxdocker ps
Windows PowerShelldocker ps
Confirm the expected container is listed as running or healthy.
If It Fails
- No such file or directory → verify the current folder and the path spelling.
- Permission denied → work inside your own lesson folder and confirm it is writable.
- Docker daemon not running → start Docker Desktop or Docker Engine, then retry.
Source: handbook.txtIf it fails
command not found → verify the required tool is installed and reopen the terminal.No such file or directory → check your current folder with pwd or Get-Location.Permission denied → confirm the lesson workspace is writable.Challenge
Repeat the verification from a fresh terminal and explain which observable signal proves each dependency is healthy.
Ship
A local AI image plus evidence that you can diagnose and recover a real container startup failure.
Next Step
Continue to Lesson 09: ENJYRA Free Capstone.
Before You Start the Lab
Confirm your machine has everything required for this lesson. Continue only when the verification commands succeed.
This lesson needs
Docker setup
Docker not installed? Show setup instructions ▾
- Check your Mac's chip architecture (Apple Silicon vs Intel) before downloading.COMMAND
uname -mExpected output"arm64" (Apple Silicon) or "x86_64" (Intel)If error
If nothing prints, open Terminal from Applications → Utilities and try again.
- Download Docker Desktop for your chip from docs.docker.com/desktop/setup/install/mac-install and open the downloaded
.dmg, then drag Docker to Applications. - Launch Docker Desktop from Applications and wait for the whale icon in the menu bar to show "Docker Desktop is running".
- Verify the CLI is installed.COMMAND
docker --versionExpected outputDocker version 2x.x.x, build xxxxxxxIf error
If “command not found”, reopen Terminal after installing so your PATH refreshes, or reinstall Docker Desktop.
- Verify the engine is actually running (not just installed).COMMAND
docker infoExpected outputA block of server information, including Server Version and ContainersIf error
If it says “Cannot connect to the Docker daemon”, open Docker Desktop and wait for the whale icon to stop animating.
- Run a real test container end-to-end.COMMAND
docker run --rm hello-worldExpected output"Hello from Docker!" followed by an explanation of what happenedIf error
If the image can't be pulled, check your internet connection; this is the only step that needs it.
- Download Docker Desktop for Windows from docs.docker.com/desktop/setup/install/windows-install and run the installer. Docker Desktop will guide you through any compatible Windows backend requirement; this lesson does not require a WSL terminal.
- If the installer asks you to enable a Windows feature or restart, follow that prompt and finish the Docker Desktop setup before continuing.
- Start Docker Desktop from the Start menu and wait for the whale icon in the system tray to report "Docker Desktop is running".
- Verify the CLI, using PowerShell or the built-in VS Code terminal (not a Bash-syntax terminal).COMMAND
docker --versionExpected outputDocker version 2x.x.x, build xxxxxxxIf error
If “not recognized”, close and reopen your terminal so PATH changes take effect.
- Verify the engine is running.COMMAND
docker infoExpected outputA block of server information, including Server Version and ContainersIf error
If it can't connect to the daemon, open Docker Desktop, wait until it reports Running, and review Docker Desktop's own Troubleshoot panel.
- Run a real test container.COMMAND
docker run --rm hello-worldExpected output"Hello from Docker!" followed by an explanation of what happenedIf error
If the pull hangs, check your internet connection and that Docker Desktop shows as running, not starting.
- Prefer Docker Engine (not Docker Desktop) on Linux. Follow the official instructions for your distribution at docs.docker.com/engine/install — for Ubuntu specifically, use docs.docker.com/engine/install/ubuntu.
- Start and enable the Docker service.COMMAND
sudo systemctl enable --now dockerExpected outputNo output on successIf error
If systemctl isn't available, your distro may use a different init system — check its Docker Engine install page.
- Confirm the service is active.COMMAND
systemctl status dockerExpected outputActive: active (running)If error
If it shows “inactive” or “failed”, re-run the enable command above and check the install steps were completed.
- Verify the CLI.COMMAND
docker --versionExpected outputDocker version 2x.x.x, build xxxxxxxIf error
If “command not found”, the Engine install likely didn't finish — re-check the distro-specific install page.
- Verify the engine responds.COMMAND
docker infoExpected outputA block of server information, including Server Version and ContainersIf error
A permission-denied error here usually means your user isn't in the docker group yet — see the note below rather than running commands as root.
- Run a real test container.COMMAND
docker run --rm hello-worldExpected output"Hello from Docker!" followed by an explanation of what happenedIf error
If you see a permission error, add your user to the docker group yourself (sudo usermod -aG docker $USER, then log out and back in) — we won't do this for you automatically.
Note: running Docker commands as root or with a global chmod on the socket is not recommended. Add your user to the docker group instead, as shown above.
Before You Run
Install Docker Desktop on macOS or Windows, or Docker Engine/Desktop using the official instructions for your Linux distribution. Start Docker and open Terminal or native Windows PowerShell.
Why Do We Need Docker?
The ENJYRA AWS, Azure, and GCP labs run locally inside Docker containers. No real AWS, Azure, or GCP account is required.
Command Breakdown
docker --version- Confirms the Docker command-line client is installed.
docker info- Asks the Docker Engine for server information, proving it is running and reachable.
docker run --rm hello-world- Runs a small official test container end to end and removes it when finished.
Expected Result
Docker version 2x.x.x
docker info: server details
Hello from Docker!What Changed
BeforeDocker is not yet confirmed.
AfterDocker CLI and Docker Engine are available to launch the local lab.
Verify It
macOSdocker --version
docker info
Linuxdocker --version
docker info
Windows PowerShelldocker --version
docker info
If It Fails
- Open Docker Desktop or start Docker Engine, wait until it reports running, and retry.
- Open a new terminal after installation so PATH changes are loaded.
- On Linux, follow the official instructions for your distribution rather than assuming Ubuntu commands apply.
Lesson-specific check
curl http://localhost:11434/api/versionIf error
If connection is refused, the Ollama container isn't running yet — start it with this lesson's start command, then retry.
Verify your setup
Run each command in your own terminal. This page cannot run commands on your machine, so tick a box only after you see the expected result.
docker --versiondocker --versiondocker --versionBefore You Run
- Your terminal is open in Any terminal folder.
- Docker Desktop or Docker Engine is running.
Why You're Running This
Confirms the Docker command-line client is installed.
Command Breakdown
docker- Runs the docker tool with the shown arguments to complete this lesson step.
Expected Result
A Docker version is printedWhat Changed
BeforeThe action shown by this card has not yet been completed or verified.
AfterThe command has completed and the next lesson step has the state it needs.
Verify It
macOSInspect the command output shown above.
LinuxInspect the command output shown above.
Windows PowerShellInspect the command output shown above.
Continue only when the observed result matches the Expected Result block.
If It Fails
- Confirm Docker CLI is installed or running, then retry the command in a new terminal.
docker infodocker infodocker infoBefore You Run
- Your terminal is open in Any terminal folder.
- Docker Desktop or Docker Engine is running.
Why You're Running This
Confirms Docker is actually running, not only installed.
Command Breakdown
docker- Runs the docker tool with the shown arguments to complete this lesson step.
Expected Result
Docker server information is returnedWhat Changed
BeforeThe action shown by this card has not yet been completed or verified.
AfterThe command has completed and the next lesson step has the state it needs.
Verify It
macOSInspect the command output shown above.
LinuxInspect the command output shown above.
Windows PowerShellInspect the command output shown above.
Continue only when the observed result matches the Expected Result block.
If It Fails
- Confirm Docker Engine is installed or running, then retry the command in a new terminal.
curl http://localhost:11434/api/versioncurl http://localhost:11434/api/versioncurl http://localhost:11434/api/versionBefore You Run
- Your terminal is open in Any terminal folder.
- The local service named in the URL is already running.
Why You're Running This
Confirms the local Ollama runtime is reachable on its API port.
Command Breakdown
curl- Makes an HTTP request to the local service and prints its response.
Expected Result
The Ollama version endpoint respondsWhat Changed
BeforeThe action shown by this card has not yet been completed or verified.
AfterThe command has completed and the next lesson step has the state it needs.
Verify It
macOSInspect the command output shown above.
LinuxInspect the command output shown above.
Windows PowerShellInspect the command output shown above.
Continue only when the observed result matches the Expected Result block.
If It Fails
- Confirm Ollama API is installed or running, then retry the command in a new terminal.
Ready to start?
- Docker CLI verified
- Docker Engine running
- Ollama API responds
- Visual Studio Code ready
Need help with a prerequisite?
Docker not running? Open Docker Desktop or start Docker Engine, then run docker info.
Permission denied? Confirm your account can access the Docker daemon; do not use a global prune.
Port already in use? Use docker ps to identify the container that owns the port.
Ollama API not responding? Run docker ps, then restart the Ollama service from the lesson command.
Model not found? Run docker exec enjyra-ollama ollama list.
Launch the ENJYRA Lab
Start only after the prerequisite checks above are complete.
This button confirms readiness; commands still run in your own terminal.
ENJYRA Lab · 08-docker-debug-v6.0.0
cd ~/enjyra-free-ai && docker build -t enjyra/free-docker-labs:08-docker-debug-v6.0.0 .cd ~/enjyra-free-ai && docker build -t enjyra/free-docker-labs:08-docker-debug-v6.0.0 .Set-Location "$HOME\enjyra-free-ai"
docker build -t enjyra/free-docker-labs:08-docker-debug-v6.0.0 .Before You Run
- Your terminal is open in ~/enjyra-free-ai.
- Docker Desktop or Docker Engine is running.
Why You're Running This
Builds the verified lesson image from the files in your ENJYRA project workspace.
Command Breakdown
cd / Set-Location- Changes the terminal’s current working directory before the next command runs.
docker build- Reads the Dockerfile, builds its layers, and tags the resulting local image.
&&- Runs the next command only when the previous command succeeds.
-t enjyra/free-docker-labs:08-docker-debug-v6.0.0- Assigns the resulting image its ENJYRA repository name and lesson version tag.
.- Uses the current folder as Docker’s build context.
Expected Result
Docker creates enjyra/free-docker-labs:08-docker-debug-v6.0.0.What Changed
BeforeNo newly verified image exists for the current source and Dockerfile.
AfterDocker has created or refreshed the local image with the requested tag.
Verify It
macOSdocker images
Linuxdocker images
Windows PowerShelldocker images
Confirm the newly built image and tag are present.
If It Fails
- Check the current folder, confirm Docker is running when required, and verify the image or script name before retrying.
What this command does Builds the verified lesson image from the files in your ENJYRA project workspace.
Docker creates enjyra/free-docker-labs:08-docker-debug-v6.0.0.If it fails
Check the current folder, confirm Docker is running when required, and verify the image or script name before retrying.
docker image inspect enjyra/free-docker-labs:08-docker-debug-v6.0.0 --format '{{.Architecture}}'docker image inspect enjyra/free-docker-labs:08-docker-debug-v6.0.0 --format '{{.Architecture}}'docker image inspect enjyra/free-docker-labs:08-docker-debug-v6.0.0 --format '{{.Architecture}}'Before You Run
- Your terminal is open in ~/enjyra-free-ai.
- Docker Desktop or Docker Engine is running.
Why You're Running This
Reads the local image metadata and prints only its architecture so you can confirm that the expected ENJYRA image exists.
Command Breakdown
docker image inspect- Reads metadata for the named local image without creating or starting a container.
enjyra/free-docker-labs:08-docker-debug-v6.0.0- Identifies the exact ENJYRA image and lesson tag to inspect.
--format- Prints only the requested metadata field instead of the complete image record.
Expected Result
amd64 or arm64What Changed
BeforeThe current state has not yet been checked.
AfterNo persistent state changed; the command printed evidence you can compare with the expected result.
Verify It
macOSdocker image inspect enjyra/free-docker-labs:08-docker-debug-v6.0.0 --format '{{.Architecture}}'
Linuxdocker image inspect enjyra/free-docker-labs:08-docker-debug-v6.0.0 --format '{{.Architecture}}'
Windows PowerShelldocker image inspect enjyra/free-docker-labs:08-docker-debug-v6.0.0 --format '{{.Architecture}}'
Run the command and compare its output with the Expected Result block.
If It Fails
- Confirm the start command completed first, then compare the image, container, port, or script name exactly with this lesson.
What this command does Reads the local image metadata and prints only its architecture so you can confirm that the expected ENJYRA image exists.
amd64 or arm64If it fails
Confirm the start command completed first, then compare the image, container, port, or script name exactly with this lesson.
Reset My Lab
docker rm -f enjyra-v6-docker-debug-08 2>/dev/null || truedocker rm -f enjyra-v6-docker-debug-08 2>/dev/null || truedocker rm -f enjyra-v6-docker-debug-08 2>$nullBefore You Run
- Your terminal is open in ~/enjyra-free-ai.
- Docker Desktop or Docker Engine is running.
Why You're Running This
Returns this lesson’s local runtime or resources to a known starting state without touching unrelated projects.
Command Breakdown
docker- Runs the docker tool with the shown arguments to complete this lesson step.
Expected Result
This lesson’s runtime state is reset or the named lesson container is removed.What Changed
BeforeThe action shown by this card has not yet been completed or verified.
AfterThe command has completed and the next lesson step has the state it needs.
Verify It
macOSInspect the command output shown above.
LinuxInspect the command output shown above.
Windows PowerShellInspect the command output shown above.
Continue only when the observed result matches the Expected Result block.
If It Fails
- Check Docker is running and make sure you are using this lesson’s exact container or launcher name.
What this command does Returns this lesson’s local runtime or resources to a known starting state without touching unrelated projects.
This lesson’s runtime state is reset or the named lesson container is removed.If it fails
Check Docker is running and make sure you are using this lesson’s exact container or launcher name.
Prove What You Learned
This lesson contains 4 focused questions. You answered 2 before the build; complete the remaining 2 now.