freeCodeCamp/guide/english/docker/docker-build/index.md

18 lines
763 B
Markdown
Raw Normal View History

2018-10-12 19:37:13 +00:00
---
title: Docker build
---
## Docker build
`docker build` creates a docker image from a Dockerfile and context. A context can be a URL or a local PATH. You can name the image using the optional `-t` tag.
2018-10-12 19:37:13 +00:00
A Dockerfile will install dependencies during the build command, from a specified URL or local PATH. Any dependencies necessary in your containers must be specified in the Dockerfile.
Your image is now stored in your machine's local Docker image registry.
2018-10-12 19:37:13 +00:00
When you have Docker containers built, you can then run your app using the appropriate run commands.
#### More Information:
- [Docker CLI docs: build](https://docs.docker.com/engine/reference/commandline/rm/)
- [Docker Building Your App](https://docs.docker.com/get-started/part2/#build-the-app)