From 19513364cc4a1afc523e9d7915584926e0fea4a5 Mon Sep 17 00:00:00 2001 From: stdevYuniers Date: Thu, 27 Dec 2018 07:57:13 -0500 Subject: [PATCH] [docker] refs #27 Use local Dockerfile to build vscode image --- docker/images/dev-cli/hooks/build | 12 +++++++----- docker/images/dev-cli/hooks/push | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/docker/images/dev-cli/hooks/build b/docker/images/dev-cli/hooks/build index d045ccf9..34bf72e3 100755 --- a/docker/images/dev-cli/hooks/build +++ b/docker/images/dev-cli/hooks/build @@ -16,6 +16,8 @@ echo "Build hook running" +ls ../../../gopath/src/github.com/skycoin/skycoin/ + # Build :develop tag docker build --build-arg BDATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ --build-arg SCOMMIT=$SOURCE_COMMIT \ @@ -24,24 +26,24 @@ docker build --build-arg BDATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ # Build :dind, :vscode and :vscode-dind tag # Only build if docker tag is develop -if [ "$CACHE_TAG" -eq "develop" ]; then +if [ "$CACHE_TAG" == "develop" ]; then docker build --build-arg IMAGE_FROM="skycoin/skycoindev-cli:dind" \ --build-arg BDATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ --build-arg SCOMMIT=$SOURCE_COMMIT \ -f $DOCKERFILE_PATH \ -t "$DOCKER_REPO:dind" . - docker build --build-arg IMAGE_FROM="simelotech/skycoindev-vscode:develop" \ + docker build --build-arg IMAGE_FROM="$IMAGE_NAME" \ --build-arg BDATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ --build-arg SCOMMIT=$SOURCE_COMMIT \ --build-arg VS_EXTENSIONS="ms-vscode.csharp Leopotam.csharpfixformat jchannon.csharpextensions k--kato.docomment formulahendry.dotnet" \ - -f $DOCKERFILE_PATH \ + -f ../../../gopath/src/github.com/skycoin/skycoin/docker/images/dev-vscode/Dockerfile \ -t "$DOCKER_REPO:vscode" . - docker build --build-arg IMAGE_FROM="simelotech/skycoindev-vscode:dind" \ + docker build --build-arg IMAGE_FROM="$DOCKER_REPO:dind" \ --build-arg BDATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ --build-arg SCOMMIT=$SOURCE_COMMIT \ --build-arg VS_EXTENSIONS="ms-vscode.csharp Leopotam.csharpfixformat jchannon.csharpextensions k--kato.docomment formulahendry.dotnet" \ - -f $DOCKERFILE_PATH \ + -f ../../../gopath/src/github.com/skycoin/skycoin/docker/images/dev-vscode/Dockerfile \ -t "$DOCKER_REPO:vscode-dind" . fi diff --git a/docker/images/dev-cli/hooks/push b/docker/images/dev-cli/hooks/push index 1d02a40a..da78a470 100755 --- a/docker/images/dev-cli/hooks/push +++ b/docker/images/dev-cli/hooks/push @@ -2,7 +2,7 @@ docker push $IMAGE_NAME -if [ "$CACHE_TAG" -eq "develop" ]; then +if [ "$CACHE_TAG" == "develop" ]; then docker push $DOCKER_REPO:dind docker push $DOCKER_REPO:vscode docker push $DOCKER_REPO:vscode-dind