Skip to content

Commit 5fe6139

Browse files
committed
Initial commit with 01 steps
0 parents  commit 5fe6139

15 files changed

+1955
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

docs/01-introduction.md

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# 👋 Welcome!
2+
3+
Welcome to this Labspace focused on teaching you, in a hands-on way, about the various concepts of tools of Docker.
4+
5+
## 📋 Learning objectives
6+
7+
In this Labspace, you're going to gain familiarity with Docker and many of its core components. Specifically, you'll get to do the following:
8+
9+
- Learn about the role of containers and images
10+
- Run containers and build images
11+
- Learn about Docker's tooling, including Docker Compose, Testcontainers, and Scout
12+
- Have fun along the way!
13+
14+
### What's _not_ in this overview?
15+
16+
The new AI-focused aspects of Docker's tooling will not be covered in this overview. That will be covered in another Labspace.
17+
18+
## 💻 App overview
19+
20+
The application we will be working with is Memes-R-Us, a fun website that simply displays memes and a welcome message.
21+
22+
Throughout this lab, you will be making changes to the application.
23+
24+
To start the app, complete the following steps:
25+
26+
1. If you have started VS Code yet in the panel to the right, click the **Load VS Code here** button.
27+
28+
2. In a terminal, install the Node dependencies by running the following command:
29+
30+
```sh
31+
npm install
32+
```
33+
34+
3. Start the app by running the following command:
35+
36+
```sh
37+
npm run dev
38+
```
39+
40+
This is going to start the app in "dev mode", which means file changes will cause the app to automatically reload.
41+
42+
Eventually, you should see the following output:
43+
44+
```plaintext
45+
Server is running on port 3000
46+
```
47+
48+
4. Open your browser to http://localhost:3000. You should see the Memes-R-Us website!
49+
50+
51+
52+
## 🐳 Your first change
53+
54+
**CHANGE REQUEST INCOMING!** We need to update the website to use a different title, image, and colors. Fortunately, it is up to you to determine what title, image, and colors to use.
55+
56+
Let's get to it! 🏃
57+
58+
### Updating the title
59+
60+
1. Open the `src/index.js` file in the VS Code editor.
61+
62+
2. Find the line that looks like the following:
63+
64+
```javascript
65+
message: "Whalecome to Docker!",
66+
```
67+
68+
This line is specifying the message to be displayed on the website. Since it's something we need to update, let's update it!
69+
70+
3. Update the message to whatever you'd like. For example, this would change the message to "Good day to you!":
71+
72+
```javascript
73+
message: "Good day to you!",
74+
```
75+
76+
Make sure you keep the surrounding `"` marks and the comma at the end.
77+
78+
4. Go back to your website (http://localhost:3000) and refresh the page. Validate the change worked. Hooray! 🎉
79+
80+
### Updating the image
81+
82+
1. Now, find the following line in the `src/index.js` file:
83+
84+
```javascript
85+
memeUrl: "https://media.giphy.com/media/yoJC2A59OCZHs1LXvW/giphy.gif"
86+
```
87+
88+
This is specifying the location of the image to display for our meme. Let's update that!
89+
90+
2. Open [giphy.com](https://giphy.com) and find an image you'd like.
91+
92+
3. Click the "chain link" icon to copy the URL. And then paste it in, replacing the URL that was there before.
93+
94+
The following update would change the image to use a different whale meme:
95+
96+
```javascript
97+
memeUrl: "https://media.giphy.com/media/CAmbqvnwDk4jAqnLg9/giphy.gif"
98+
```
99+
100+
4. Go back to your page and refresh the page to validate it worked.
101+
102+
### Updating the color palette
103+
104+
1. Open the `src/assets/styles.css` file in the VS Code editor.
105+
106+
2. Update the `background-color` attributes for the `body` and `#content` sections.
107+
108+
- The `body` update will change the entire page background
109+
- The `#content` update will change the background color for only the card displaying the image and title
110+
111+
3. Go back to your page and refresh the page to validate the changes worked.
112+
113+
114+
Phew! Our website has been updated!
115+
116+
## Next steps
117+
118+
Now that you have the site up and running and a few changes applied to it, we're ready for the next feature!

docs/02-running-a-containerized-service.md

Whitespace-only changes.

docs/03-adding-dev-tools.md

Whitespace-only changes.

docs/04-running-tests.md

Whitespace-only changes.

docs/05-building-and-pushing-an-image.md

Whitespace-only changes.

docs/06-securing-the-image.md

Whitespace-only changes.

labspace.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
title: Docker Overview
2+
description: |
3+
An introduction to the various concepts of Docker
4+
5+
sections:
6+
- title: Introduction
7+
contentPath: ./docs/01-introduction.md
8+
- title: Running a containerized service
9+
contentPath: ./docs/02-running-a-containerized-service.md
10+
- title: Adding dev tools
11+
contentPath: ./docs/03-adding-dev-tools.md
12+
- title: Running tests
13+
contentPath: ./docs/04-running-tests.md
14+
- title: Building and pushing an image
15+
contentPath: ./docs/05-building-and-pushing-an-image.md
16+
- title: Securing the image
17+
contentPath: ./docs/06-securing-the-image.md

0 commit comments

Comments
 (0)