build.rst 669 B

12345678910111213141516171819202122232425262728
  1. :title: Build Command
  2. :description: Build a new image from the Dockerfile passed via stdin
  3. :keywords: build, docker, container, documentation
  4. ================================================
  5. ``build`` -- Build a container from a Dockerfile
  6. ================================================
  7. ::
  8. Usage: docker build [OPTIONS] PATH | -
  9. Build a new container image from the source code at PATH
  10. -t="": Tag to be applied to the resulting image in case of success.
  11. Examples
  12. --------
  13. .. code-block:: bash
  14. docker build .
  15. This will take the local Dockerfile
  16. .. code-block:: bash
  17. docker build -
  18. This will read a Dockerfile form Stdin without context