From ac0577f4fbd76a05c65e1a690238844721c9cbb9 Mon Sep 17 00:00:00 2001 From: Usha Mandya Date: Thu, 10 Dec 2020 07:31:13 +0000 Subject: [PATCH] Remove info on two-phase build Signed-off-by: Usha Mandya --- docker-hub/builds/advanced.md | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/docker-hub/builds/advanced.md b/docker-hub/builds/advanced.md index 0f6228b184..a19bde828a 100644 --- a/docker-hub/builds/advanced.md +++ b/docker-hub/builds/advanced.md @@ -92,19 +92,6 @@ the automated build fails. To learn more about Docker build-time variables, see the [docker build documentation](/engine/reference/commandline/build/#set-build-time-variables-build-arg). -#### Two-phase build - -If your build process requires a component that is not a dependency for your application, you can use a pre-build hook (refers to the `hooks/pre_build` file) to collect and compile required components. In the example below, the hook uses a Docker container to compile a Golang binary that is required before the build. - -```bash -#!/bin/bash -echo "=> Building the binary" -docker run --privileged \ - -v $(pwd):/src \ - -v /var/run/docker.sock:/var/run/docker.sock \ - centurylink/golang-builder -``` - #### Push to multiple repos By default the build process pushes the image only to the repository where the build settings are configured. If you need to push the same image to multiple repositories, you can set up a `post_push` hook to add additional tags and push to more repositories.