Skip to content

Commit ff86f7f

Browse files
committed
Move the multistage tutorial to the beginning
1 parent 3d8e01f commit ff86f7f

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

content/guides/cpp/_index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ The C++ getting started guide teaches you how to create a containerized C++ appl
2121
>
2222
> Docker would like to thank [Pradumna Saraf](https://twitter.com/pradumna_saraf) and [Mohammad-Ali A'râbi](https://twitter.com/MohammadAliEN) for his contribution to this guide.
2323
24-
- Containerize and run a C++ application
24+
- Containerize and run a C++ application using a multi-stage Docker build
25+
- Build and run a C++ application using Docker Compose
2526
- Set up a local environment to develop a C++ application using containers
2627
- Configure a CI/CD pipeline for a containerized C++ application using GitHub Actions
2728
- Deploy your containerized application locally to Kubernetes to test and debug your deployment
28-
- Create multi-stage builds for your C++ application to optimize the size of your Docker image
2929

3030
After completing the C++ getting started modules, you should be able to containerize your own C++ application based on the examples and instructions provided in this guide.
3131

content/guides/cpp/containerize.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
title: Containerize a C++ application
3-
linkTitle: Containerize your app
3+
linkTitle: Build and run a C++ application using Docker Compose
44
weight: 10
55
keywords: C++, containerize, initialize
6-
description: Learn how to containerize a C++ application.
6+
description: Learn how to use Docker Compose to build and run a C++ application.
77
aliases:
88
- /language/cpp/containerize/
99
- /guides/language/cpp/containerize/
@@ -15,17 +15,17 @@ aliases:
1515

1616
## Overview
1717

18-
This section walks you through containerizing and running a C++ application.
18+
This section walks you through containerizing and running a C++ application, using Docker Compose.
1919

2020
## Get the sample application
2121

22-
Clone the sample application to use with this guide. Open a terminal, change directory to a directory that you want to work in, and run the following command to clone the repository:
22+
We're using the same sample repository that you used in the previous sections of this guide. If you haven't already cloned the repository, clone it now:
2323

2424
```console
2525
$ git clone https://github.com/dockersamples/c-plus-plus-docker.git
2626
```
2727

28-
You should now have the following contents in your `c-plus-plus-docker`
28+
You should now have the following contents in your `c-plus-plus-docker` (root)
2929
directory.
3030

3131
```text

content/guides/cpp/multistage.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Create a multi-stage build for your C++ application
3-
linkTitle: Containerize your app
4-
weight: 60
3+
linkTitle: Containerize your app using a multi-stage build
4+
weight: 5
55
keywords: C++, containerize, multi-stage
66
description: Learn how to create a multi-stage build for a C++ application.
77
aliases:
@@ -19,9 +19,12 @@ This section walks you through creating a multi-stage Docker build for a C++ app
1919
A multi-stage build is a Docker feature that allows you to use different base images for different stages of the build process,
2020
so you can optimize the size of your final image and separate build dependencies from runtime dependencies.
2121

22+
The standard practice for compiled languages like C++ is to have a build stage that compiles the code and a runtime stage that runs the compiled binary,
23+
because the build dependencies are not needed at runtime.
24+
2225
## Get the sample application
2326

24-
We're using the same sample repository that you used in the previous sections of this guide. If you haven't already cloned the repository, clone it now:
27+
Let's use a simple C++ application that prints `Hello, World!` to the terminal. To do so, clone the sample repository to use with this guide:
2528

2629
```bash
2730
$ git clone https://github.com/dockersamples/c-plus-plus-docker.git

0 commit comments

Comments
 (0)