From the course: Web Servers and APIs using C++
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Adding a volume - C++ Tutorial
From the course: Web Servers and APIs using C++
Adding a volume
- [Instructor] We are going to work on our host machine by build and run on the container. In order to edit files on the Docker container from our host machine, we are going to create a volume. A volume is a directory shared by the host machine and one or more Docker containers. We add a volume with the -v option of the docker run command. The volume option begins with a -v, is followed by a space, and two halves separated by a colon. The left half is the absolute path to the directory of the host machine. The right half is the absolute path to the directory on the container. I am going to create my volume using the cppweb directory that I created on the desktop. Here is the Docker command to do that. Please substitute your directory path for mine. So it's docker run - v /Users /troymiles /Desktop /cppweb: /usr/src and /cppweb -ti cppbox: latest bash. Do note, the rest of the command is stuff we've seen before. The -ti puts Docker in terminal interactive mode, cppbox:latest is our…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
(Locked)
Installing Docker1m 29s
-
(Locked)
Installing Atom35s
-
(Locked)
Creating a Dockerfile5m 16s
-
(Locked)
Running a Dockerfile1m 50s
-
(Locked)
Adding a volume2m 33s
-
(Locked)
Building Crow9m 33s
-
(Locked)
Serving the example3m 7s
-
(Locked)
Challenge: Modify the example page31s
-
(Locked)
Solution: Modify the example page2m
-
(Locked)
-
-
-
-
-
-