|
| 1 | +# Step 04 – Run and Manage Project Containers |
| 2 | + |
| 3 | +This step covers starting the project containers, verifying they run correctly, and managing their lifecycle. |
| 4 | + |
| 5 | +--- |
| 6 | + |
| 7 | +## 🧭 Overview |
| 8 | + |
| 9 | +| Step | Action | |
| 10 | +|-------|---------| |
| 11 | +| 4.1 | Run the project containers with `./up` | |
| 12 | +| 4.2 | Verify container startup and logs | |
| 13 | +| 4.3 | Stop or restart containers | |
| 14 | +| 4.4 | Next steps and troubleshooting | |
| 15 | + |
| 16 | +--- |
| 17 | + |
| 18 | +## 🧩 Detailed Steps |
| 19 | + |
| 20 | +### 4.1 Run the project containers |
| 21 | + |
| 22 | +1. Open your terminal (Git Bash or Ubuntu WSL, whichever you prefer) |
| 23 | +2. Navigate to your project directory: |
| 24 | + |
| 25 | +<pre> |
| 26 | +cd path/to/your/project |
| 27 | +</pre> |
| 28 | + |
| 29 | +3. Run the startup script: |
| 30 | + |
| 31 | +<pre> |
| 32 | +./up |
| 33 | +</pre> |
| 34 | + |
| 35 | +4. You will be prompted to provide some configuration info (e.g., your name, email). Fill in as needed. |
| 36 | +5. Confirm the prompts by typing `yes` or `y` to start the containers. |
| 37 | + |
| 38 | +*The script will pull necessary images, configure SSH keys inside the containers, and launch your project services.* |
| 39 | + |
| 40 | +--- |
| 41 | + |
| 42 | +### 4.2 Verify container startup and logs |
| 43 | + |
| 44 | +- After starting, watch the terminal output for any errors. |
| 45 | +- If everything goes well, you should see container logs indicating success, e.g.: |
| 46 | + |
| 47 | +<pre> |
| 48 | +SUCCESS> root ssh is settup |
| 49 | +Cloning into 'EAMD.ucp'... |
| 50 | +... |
| 51 | +</pre> |
| 52 | + |
| 53 | +- You can list running containers in a new terminal with: |
| 54 | + |
| 55 | +<pre> |
| 56 | +docker ps |
| 57 | +</pre> |
| 58 | + |
| 59 | +- To view logs of a specific container: |
| 60 | + |
| 61 | +<pre> |
| 62 | +docker logs <container_name_or_id> |
| 63 | +</pre> |
| 64 | + |
| 65 | +--- |
| 66 | + |
| 67 | +### 4.3 Stop or restart containers |
| 68 | + |
| 69 | +- To stop the running containers, press `Ctrl + C` in the terminal running `./up`, or open a new terminal and run: |
| 70 | + |
| 71 | +<pre> |
| 72 | +docker-compose down |
| 73 | +</pre> |
| 74 | + |
| 75 | +- To start the containers again later, just rerun: |
| 76 | + |
| 77 | +<pre> |
| 78 | +./up |
| 79 | +</pre> |
| 80 | + |
| 81 | +- Note: If your `./up` script supports a detached mode (running containers in background), check the script or ask your team about using: |
| 82 | + |
| 83 | +<pre> |
| 84 | +./up -d |
| 85 | +</pre> |
| 86 | + |
| 87 | +--- |
| 88 | + |
| 89 | +### 4.4 Next steps and troubleshooting |
| 90 | + |
| 91 | +- If you encounter errors during container startup, check the terminal logs for clues. |
| 92 | +- Verify your SSH keys are properly set up, as some containers depend on SSH for cloning repos. |
| 93 | +- Ensure Docker Desktop is running and WSL integration is enabled. |
| 94 | +- For any container networking issues, try restarting Docker Desktop and your WSL distro. |
| 95 | +- Consult the project README or internal docs for specific service URLs or API endpoints once containers are up. |
| 96 | + |
| 97 | +--- |
| 98 | + |
| 99 | +## ✅ Outcome |
| 100 | + |
| 101 | +- Project containers are running and ready for development or testing. |
| 102 | +- You know how to start, stop, and check logs for the containers. |
| 103 | +- You have basic troubleshooting knowledge for common startup issues. |
0 commit comments