build.rst 850 B

123456789101112131415161718192021222324252627282930313233343536373839
  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 Dockerfile via stdin
  6. ========================================================
  7. ::
  8. Usage: docker build [CONTEXT|-]
  9. Build a new image from a Dockerfile
  10. Examples
  11. --------
  12. .. code-block:: bash
  13. docker build
  14. This will take the local Dockerfile without context
  15. .. code-block:: bash
  16. docker build -
  17. This will read a Dockerfile form Stdin without context
  18. .. code-block:: bash
  19. docker build .
  20. This will take the local Dockerfile and set the current directory as context
  21. .. code-block:: bash
  22. docker build - .
  23. This will read a Dockerfile from Stdin and set the current directory as context