Skip to content

Commit 30de045

Browse files
committed
change docker compose command
1 parent d3b09b6 commit 30de045

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

hello-world-compose/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#### **Build and Start the Services**
77
1. Build and start the services:
88
```bash
9-
docker-compose up --build
9+
docker compose up --build
1010
```
1111

1212
2. Verify the services:
@@ -23,17 +23,17 @@
2323

2424
2. **Stop services**:
2525
```bash
26-
docker-compose stop
26+
docker compose stop
2727
```
2828

2929
3. **Restart services**:
3030
```bash
31-
docker-compose restart
31+
docker compose restart
3232
```
3333

3434
4. **Remove containers and networks**:
3535
```bash
36-
docker-compose down
36+
docker compose down
3737
```
3838

3939
---
@@ -46,7 +46,7 @@
4646

4747
2. Rebuild and restart the service:
4848
```bash
49-
docker-compose up --build
49+
docker compose up --build
5050
```
5151

5252
3. Verify the updated response.
@@ -66,7 +66,7 @@
6666

6767
2. Reload Nginx:
6868
```bash
69-
docker-compose restart nginx
69+
docker compose restart nginx
7070
```
7171

7272
3. Test the custom 404 error by visiting an invalid path: `http://localhost:8080/nonexistent`.
@@ -76,7 +76,7 @@
7676
#### **Scaling the Backend Service**
7777
1. Scale the backend service to 3 instances:
7878
```bash
79-
docker-compose up --scale backend=3
79+
docker compose up --scale backend=3
8080
```
8181

8282
2. Observe the container distribution:
@@ -91,7 +91,7 @@
9191
#### **Clean Up**
9292
1. Stop and remove all containers, networks, and volumes:
9393
```bash
94-
docker-compose down -v
94+
docker compose down -v
9595
```
9696

9797
2. Optionally, remove built images:

lab7-docker-compose-storage-networking.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ supersecretpassword
134134
#### **Part 1: Networking**
135135
1. **Start the Services**:
136136
```bash
137-
docker-compose up --build
137+
docker compose up --build
138138
```
139139

140140
2. **Inspect the Network**:
@@ -160,11 +160,11 @@ supersecretpassword
160160
1. **Check Persistent Data**:
161161
- Stop and remove the containers:
162162
```bash
163-
docker-compose down
163+
docker compose down
164164
```
165165
- Start the services again:
166166
```bash
167-
docker-compose up
167+
docker compose up
168168
```
169169
- Verify that the data in the `users` table is still intact (persistent storage).
170170

@@ -176,7 +176,7 @@ supersecretpassword
176176

177177
3. **Clean Up the Volume**:
178178
```bash
179-
docker-compose down -v
179+
docker compose down -v
180180
```
181181

182182
#### **Part 3: Secrets**
@@ -197,7 +197,7 @@ supersecretpassword
197197
- Modify the `db_password.txt` file with a new password.
198198
- Restart the `db` service to reflect the change:
199199
```bash
200-
docker-compose up -d
200+
docker compose up -d
201201
```
202202

203203
4. **Test with Incorrect Secrets**:
@@ -210,5 +210,5 @@ supersecretpassword
210210
#### **Clean-Up**
211211
To remove all containers, networks, volumes, and secrets created during the lab:
212212
```bash
213-
docker-compose down --volumes --remove-orphans
213+
docker compose down --volumes --remove-orphans
214214
```

0 commit comments

Comments
 (0)