From the course: Docker for Developers: Create and Manage Docker Containers
Unlock this course with a free trial
Join today to access over 24,900 courses taught by industry experts.
Writing a Dockerfile - Docker Tutorial
From the course: Docker for Developers: Create and Manage Docker Containers
Writing a Dockerfile
- [Instructor] It's best to create custom images instead of relying solely on official ones from Docker Hub. You can start with an official image as a base, then use a Docker file to tailor it to your project's needs. A Docker file is a simple text file that tells Docker how to build an image. It's like a recipe that lists all of the steps needed to create a container ready environment. You define things like the base image to start from, which files to copy in, which dependencies to install, and how to run your application. In the GitHub repo for this course, I've created a simple node.js app that just displays a hello from Docker message in a web browser. This app listens on Port 3000. I have this project open in VS code. You don't need to know node.js in order to code along with me, we'll focus solely on Docker support. To run this app, we need to build a custom image using the provided docker file, which defines how…
Contents
-
-
-
-
-
(Locked)
Finding and pulling Docker images2m 39s
-
(Locked)
Writing a Dockerfile3m 23s
-
(Locked)
Using the docker build command2m 2s
-
(Locked)
Listing, inspecting, and removing images3m 4s
-
(Locked)
Working with an image repository2m 53s
-
(Locked)
Challenge: Building a custom image1m 4s
-
(Locked)
Solution: Building a custom image1m 38s
-
(Locked)
-
-
-
-
-
-