diff --git a/Dockerfile b/Dockerfile index be38e73fc1..51c90d4818 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,3 +10,4 @@ ENV USER root WORKDIR /go/src/github.com/docker/machine ADD . /go/src/github.com/docker/machine +RUN mkdir bin diff --git a/script/build_in_container.sh b/script/build_in_container.sh index f412a45027..130bb84f6c 100755 --- a/script/build_in_container.sh +++ b/script/build_in_container.sh @@ -26,10 +26,8 @@ docker run --name $DOCKER_CONTAINER_NAME \ $DOCKER_IMAGE_NAME \ make "$@" -if [[ -d bin ]]; then +if [[ "$@" == *"clean"* ]] && [[ -d bin ]]; then rm -Rf bin fi -if [[ "$@" == *"build"* ]]; then - docker cp $DOCKER_CONTAINER_NAME:/go/src/github.com/docker/machine/bin bin -fi +docker cp $DOCKER_CONTAINER_NAME:/go/src/github.com/docker/machine/bin .