Skip to content

Commit

Permalink
[docker] refs #27 Use local Dockerfile to build vscode image
Browse files Browse the repository at this point in the history
  • Loading branch information
stdevYuniers committed Dec 27, 2018
1 parent c1f791c commit 1951336
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions docker/images/dev-cli/hooks/build
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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
2 changes: 1 addition & 1 deletion docker/images/dev-cli/hooks/push
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1951336

Please sign in to comment.