diff options
| author | chriseth <chris@ethereum.org> | 2018-11-28 21:38:57 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-11-28 21:38:57 +0800 |
| commit | d748165fb2512013658e3c16a528caf57a6a8e35 (patch) | |
| tree | 64b9f4b4d521b351116a5f572740e6cfccf8cfa4 | |
| parent | 47bd906541df14c266600f03dd3fb28cfbe944b2 (diff) | |
| parent | 9a2cb7bbc11faa7ae051f80ff4425746711a7b95 (diff) | |
| download | dexon-solidity-d748165fb2512013658e3c16a528caf57a6a8e35.tar dexon-solidity-d748165fb2512013658e3c16a528caf57a6a8e35.tar.gz dexon-solidity-d748165fb2512013658e3c16a528caf57a6a8e35.tar.bz2 dexon-solidity-d748165fb2512013658e3c16a528caf57a6a8e35.tar.lz dexon-solidity-d748165fb2512013658e3c16a528caf57a6a8e35.tar.xz dexon-solidity-d748165fb2512013658e3c16a528caf57a6a8e35.tar.zst dexon-solidity-d748165fb2512013658e3c16a528caf57a6a8e35.zip | |
Merge pull request #5522 from juztin/develop
Builds both scratch & Alpine Docker images
| -rw-r--r-- | Changelog.md | 1 | ||||
| -rw-r--r-- | scripts/Dockerfile_alpine | 5 | ||||
| -rwxr-xr-x | scripts/docker_build.sh | 4 | ||||
| -rwxr-xr-x | scripts/docker_deploy.sh | 24 | ||||
| -rwxr-xr-x | scripts/docker_deploy_manual.sh | 27 |
5 files changed, 43 insertions, 18 deletions
diff --git a/Changelog.md b/Changelog.md index a90580bc..4defbbe4 100644 --- a/Changelog.md +++ b/Changelog.md @@ -22,6 +22,7 @@ Bugfixes: Build System: * Emscripten: Upgrade to Emscripten SDK 1.37.21 and boost 1.67. + * Docker: Includes both Scratch and Alpine images. diff --git a/scripts/Dockerfile_alpine b/scripts/Dockerfile_alpine new file mode 100644 index 00000000..21bba456 --- /dev/null +++ b/scripts/Dockerfile_alpine @@ -0,0 +1,5 @@ +FROM alpine +MAINTAINER chriseth <chris@ethereum.org> + +COPY upload/solc-static-linux /usr/local/bin/solc +ENTRYPOINT ["/usr/local/bin/solc"] diff --git a/scripts/docker_build.sh b/scripts/docker_build.sh index 22657a8c..9eedec34 100755 --- a/scripts/docker_build.sh +++ b/scripts/docker_build.sh @@ -2,7 +2,11 @@ set -e +# Scratch image docker build -t ethereum/solc:build -f scripts/Dockerfile . tmp_container=$(docker create ethereum/solc:build sh) mkdir -p upload docker cp ${tmp_container}:/usr/bin/solc upload/solc-static-linux + +# Alpine image +docker build -t ethereum/solc:build-alpine -f scripts/Dockerfile_alpine . diff --git a/scripts/docker_deploy.sh b/scripts/docker_deploy.sh index 00705725..36e918cf 100755 --- a/scripts/docker_deploy.sh +++ b/scripts/docker_deploy.sh @@ -2,20 +2,28 @@ set -e +image="ethereum/solc" + +tag_and_push() +{ + docker tag "$image:$1" "$image:$2" + docker push "$image:$2" +} + docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"; version=$($(dirname "$0")/get_version.sh) if [ "$TRAVIS_BRANCH" = "develop" ] then - docker tag ethereum/solc:build ethereum/solc:nightly; - docker tag ethereum/solc:build ethereum/solc:nightly-"$version"-"$TRAVIS_COMMIT" - docker push ethereum/solc:nightly-"$version"-"$TRAVIS_COMMIT"; - docker push ethereum/solc:nightly; + tag_and_push build nightly + tag_and_push build nightly-"$version"-"$TRAVIS_COMMIT" + tag_and_push build-alpine nightly-alpine + tag_and_push build-alpine nightly-alpine-"$version"-"$TRAVIS_COMMIT" elif [ "$TRAVIS_TAG" = v"$version" ] then - docker tag ethereum/solc:build ethereum/solc:stable; - docker tag ethereum/solc:build ethereum/solc:"$version"; - docker push ethereum/solc:stable; - docker push ethereum/solc:"$version"; + tag_and_push build stable + tag_and_push build "$version" + tag_and_push build-alpine stable-alpine + tag_and_push build-alpine "$version"-alpine else echo "Not publishing docker image from branch $TRAVIS_BRANCH or tag $TRAVIS_TAG" fi diff --git a/scripts/docker_deploy_manual.sh b/scripts/docker_deploy_manual.sh index c098f4ee..0393d22d 100755 --- a/scripts/docker_deploy_manual.sh +++ b/scripts/docker_deploy_manual.sh @@ -7,6 +7,7 @@ then echo "Usage: $0 <tag/branch>" exit 1 fi +image="ethereum/solc" branch="$1" #docker login @@ -27,21 +28,27 @@ else date -u +"nightly.%Y.%-m.%-d" > prerelease.txt fi +tag_and_push() +{ + docker tag "$image:$1" "$image:$2" + docker push "$image:$2" +} + rm -rf .git -docker build -t ethereum/solc:build -f scripts/Dockerfile . -tmp_container=$(docker create ethereum/solc:build sh) +docker build -t "$image":build -f scripts/Dockerfile . +tmp_container=$(docker create "$image":build sh) if [ "$branch" = "develop" ] then - docker tag ethereum/solc:build ethereum/solc:nightly; - docker tag ethereum/solc:build ethereum/solc:nightly-"$version"-"$commithash" - docker push ethereum/solc:nightly-"$version"-"$commithash"; - docker push ethereum/solc:nightly; + tag_and_push build nightly + tag_and_push build nightly-"$version"-"$commithash" + tag_and_push build-alpine nightly-alpine + tag_and_push build-alpine nightly-alpine-"$version"-"$commithash" elif [ "$branch" = v"$version" ] then - docker tag ethereum/solc:build ethereum/solc:stable; - docker tag ethereum/solc:build ethereum/solc:"$version"; - docker push ethereum/solc:stable; - docker push ethereum/solc:"$version"; + tag_and_push build stable + tag_and_push build "$version" + tag_and_push build-alpine stable-alpine + tag_and_push build-alpine "$version"-alpine else echo "Not publishing docker image from branch or tag $branch" fi |
