|
| 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! |
0 commit comments