From the course: Web Servers and APIs using C++

Unlock the full course today

Join today to access over 22,700 courses taught by industry experts or purchase this course individually.

Creating a Dockerfile

Creating a Dockerfile - C++ Tutorial

From the course: Web Servers and APIs using C++

Start my 1-month free trial

Creating a Dockerfile

- [Instructor] I'm going to work from the desktop folder to make it simpler to find my projects later. I recommend that you do the same. From the desktop, create a directory called cppweb, mkdir cppweb, and CD into it, cd cppweb. From this directory, let's create one called cppbox, mkdir cppbox, and then CD into that directory as well. Now from here, we're gonna type atom space Dockerfile, and Docker has a capital D, and it's all one word, and hit enter. Please keep the terminal window open though, 'cause we'll use it quite a bit later. The Dockerfile is the blueprint we'll use to create our Docker image. Luckily, we don't have to start from scratch. We can base our new image on an older and well-proven one. We'll use the official gccdockerimage to seed ours. GCC stands for the GNU Compiler Collection. It is a C++ compiler and a few other tools. Each line of our Dockerfile begins with a command, which is all uppercase, then a space, end the command to execute. If a line gets too long,…

Contents