From fecee0d61a508a18376a9348c4bd04132ab2834c Mon Sep 17 00:00:00 2001 From: Ein Verne Date: Wed, 1 Apr 2020 08:46:28 +0800 Subject: [PATCH] docker-build: add page (#3940) --- pages/common/docker-build.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 pages/common/docker-build.md diff --git a/pages/common/docker-build.md b/pages/common/docker-build.md new file mode 100644 index 0000000000..0b542e984f --- /dev/null +++ b/pages/common/docker-build.md @@ -0,0 +1,28 @@ +# docker build + +> Build an image from a Dockerfile. +> More information: . + +- Build a docker image using the Dockerfile in the current directory: + +`docker build .` + +- Build a docker image from a Dockerfile at a specified URL: + +`docker build {{github.com/creack/docker-firefox}}` + +- Build a docker image and tag it: + +`docker build --tag {{name:tag}} .` + +- Do not use the cache when building the image: + +`docker build --no-cache --tag {{name:tag}} .` + +- Build a docker image using a specific Dockerfile: + +`docker build --file {{Dockerfile}} .` + +- Build with custom build-time variables: + +`docker build --build-arg {{HTTP_PROXY=http://10.20.30.2:1234}} --build-arg {{FTP_PROXY=http://40.50.60.5:4567}} .`