From 9fb9c6a284c6d03ecbe4198722c52fd1610bd09b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20=C5=9Aliwak?= Date: Fri, 10 Oct 2025 15:20:59 +0200 Subject: [PATCH] Discontinue official Docker images of Solidity --- .circleci/config.yml | 25 ----------- Changelog.md | 2 + ReleaseChecklist.md | 8 ---- docs/installing-solidity.rst | 44 +++---------------- scripts/Dockerfile | 38 ---------------- scripts/Dockerfile_alpine | 6 --- scripts/docker_deploy_manual.sh | 78 --------------------------------- 7 files changed, 9 insertions(+), 192 deletions(-) delete mode 100644 scripts/Dockerfile delete mode 100644 scripts/Dockerfile_alpine delete mode 100755 scripts/docker_deploy_manual.sh diff --git a/.circleci/config.yml b/.circleci/config.yml index 2276350e0469..8ab865711211 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1974,28 +1974,6 @@ jobs: - matrix_notify_failure_unless_pr - matrix_notify_release_unless_pr - b_alpine_docker: - <<: *base_cimg_small - steps: - - setup_remote_docker: - # Always build from scratch to use current packages. - # This job is only meant to run nightly so build time is not an issue. - docker_layer_caching: false - - checkout - - run: - name: Disable partial clone and fetch all objects - command: | - git config remote.origin.promisor false - git config --unset remote.origin.partialclonefilter - git fetch --refetch origin - - run: - name: Build and tag the container - command: scripts/docker_deploy_manual.sh develop "file://$PWD" --no-push - - run: - name: Smoke test - command: docker run --pull=never ghcr.io/argotorg/solc:build-alpine --version - - matrix_notify_failure_unless_pr - workflows: version: 2 @@ -2191,9 +2169,6 @@ workflows: - b_ubu: *requires_nothing - t_ubu_soltest_deprecated_evm_versions: *requires_b_ubu - # Build in a Docker container (on Alpine Linux) - - b_alpine_docker: *requires_nothing - nightly-ossfuzz: triggers: diff --git a/Changelog.md b/Changelog.md index 655e66e5418a..77252aae2cd7 100644 --- a/Changelog.md +++ b/Changelog.md @@ -6,6 +6,8 @@ Compiler Features: Bugfixes: +Build System: +* Docker: Discontinue DockerHub as a binary distribution channel. ### 0.8.33 (2025-12-18) diff --git a/ReleaseChecklist.md b/ReleaseChecklist.md index d9f6b84a80da..65dd53ddad0b 100644 --- a/ReleaseChecklist.md +++ b/ReleaseChecklist.md @@ -3,9 +3,6 @@ ## Requirements - GitHub account with access to [solidity](https://github.com/argotorg/solidity), [solc-js](https://github.com/argotorg/solc-js), [solc-bin](https://github.com/argotorg/solc-bin), [solidity-website](https://github.com/argotorg/solidity-website). -- Personal Access Token (PAT) with `write:packages` scope to access Github's container registry. - You can generate one by visiting https://github.com/settings/tokens/new?scopes=write:packages. -- Ubuntu/Debian dependencies of the Docker script: `docker-buildx`. - [npm Registry](https://www.npmjs.com) account added as a collaborator for the [`solc` package](https://www.npmjs.com/package/solc). - Access to the [solidity_lang Twitter account](https://twitter.com/solidity_lang). - [Reddit](https://www.reddit.com) account that is at least 10 days old with a minimum of 20 comment karma (`/r/ethereum` requirements). @@ -76,11 +73,6 @@ At least a day before the release: ### Homebrew and MacOS - [ ] Update the version and the hash (`sha256sum solidity_$VERSION.tar.gz`) in the [`solidity` formula in Homebrew core repository](https://github.com/Homebrew/homebrew-core/blob/master/Formula/s/solidity.rb). -### Docker -- [ ] Make sure `docker-buildx` is installed. -- [ ] Run `echo $GHCR_TOKEN | docker login ghcr.io --username $GH_USERNAME --password-stdin` where `$GH_USERNAME` is your GitHub username and `$GHCR_TOKEN` is a PAT with `write:packages` scope. -- [ ] Run `./scripts/docker_deploy_manual.sh v$VERSION`. - ### Release solc-js - [ ] Wait until solc-bin was properly deployed. You can test this via remix - a test run through remix is advisable anyway. - [ ] Increment the version number, create a pull request for that, merge it after tests succeeded. diff --git a/docs/installing-solidity.rst b/docs/installing-solidity.rst index 97a754eaaab0..81762db36be4 100644 --- a/docs/installing-solidity.rst +++ b/docs/installing-solidity.rst @@ -71,44 +71,14 @@ Please refer to the solc-js repository for instructions. Docker ====== -Docker images of Solidity builds are available using the `solc `_ image from the argotorg organization on ghcr.io. -Use the ``stable`` tag for the latest released version, and ``nightly`` for potentially unstable changes in the ``develop`` branch. - -The Docker image runs the compiler executable so that you can pass all compiler arguments to it. -For example, the command below pulls the stable version of the ``solc`` image (if you do not have it already), -and runs it in a new container, passing the ``--help`` argument. - -.. code-block:: bash - - docker run ghcr.io/argotorg/solc:stable --help - -.. note:: - - Specific compiler versions are supported as the Docker image tag such as ``ghcr.io/argotorg/solc:0.8.23``. - We will be passing the ``stable`` tag here instead of specific version tag to ensure that users get - the latest version by default and avoid the issue of an out-of-date version. - -To use the Docker image to compile Solidity files on the host machine, mount a -local folder for input and output, and specify the contract to compile. For example: - -.. code-block:: bash - - docker run \ - --volume "/tmp/some/local/path/:/sources/" \ - ghcr.io/argotorg/solc:stable \ - /sources/Contract.sol \ - --abi \ - --bin \ - --output-dir /sources/output/ - -You can also use the standard JSON interface (which is recommended when using the compiler with tooling). -When using this interface, it is not necessary to mount any directories as long as the JSON input is -self-contained (i.e. it does not refer to any external files that would have to be -:ref:`loaded by the import callback `). - -.. code-block:: bash +Docker images containing Solidity builds up to version 0.8.31 are available in Github's container +registry as `solc `_ under the ``argotorg`` organization. +However, we have discontinued this distribution method and future versions will not be added there. - docker run ghcr.io/argotorg/solc:stable --standard-json < input.json > output.json +The images contain only a statically-linked compiler binary and were provided merely for convenience, +as a way to download and manage multiple versions using Docker. +On systems with Docker already installed this made it possible to use any version of the +compiler with a simple ``docker run ethereum/solc:`` command. Linux Packages ============== diff --git a/scripts/Dockerfile b/scripts/Dockerfile deleted file mode 100644 index fa9f65b6f464..000000000000 --- a/scripts/Dockerfile +++ /dev/null @@ -1,38 +0,0 @@ -FROM alpine AS build - -#Establish working directory as solidity -WORKDIR /solidity - -# Build dependencies -RUN apk update && apk add boost-dev boost-static build-base cmake git clang - -#Copy working directory to the image -COPY . /solidity - -# Number of parallel jobs during build -# or 0 for auto-computing (max(1, CPU_core_count * 2/3), a greedy value) -ARG BUILD_CONCURRENCY="0" - -#Install dependencies, eliminate annoying warnings -RUN sed -i -E -e 's/include /include /' /usr/include/boost/asio/detail/socket_types.hpp -RUN cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -DTESTS=0 -DSOLC_LINK_STATIC=1 -RUN make solc \ - -j$(awk "BEGIN { \ - if (${BUILD_CONCURRENCY} != 0) { \ - print(${BUILD_CONCURRENCY}); \ - } else { \ - x=($(grep -c ^processor /proc/cpuinfo) * 2/3); \ - if (x > 1) { \ - printf(\"%d\n\", x); \ - } else { \ - print(1); \ - } \ - } \ - }") -RUN strip solc/solc - -FROM scratch -LABEL org.opencontainers.image.source=https://github.com/argotorg/solidity -LABEL maintainer="Solidity Team " -COPY --from=build /solidity/solc/solc /usr/bin/solc -ENTRYPOINT ["/usr/bin/solc"] diff --git a/scripts/Dockerfile_alpine b/scripts/Dockerfile_alpine deleted file mode 100644 index 8db45d102462..000000000000 --- a/scripts/Dockerfile_alpine +++ /dev/null @@ -1,6 +0,0 @@ -FROM alpine -LABEL org.opencontainers.image.source=https://github.com/argotorg/solidity -LABEL maintainer="Solidity Team " - -COPY upload/solc-static-linux /usr/local/bin/solc -ENTRYPOINT ["/usr/local/bin/solc"] diff --git a/scripts/docker_deploy_manual.sh b/scripts/docker_deploy_manual.sh deleted file mode 100755 index 715147765c7c..000000000000 --- a/scripts/docker_deploy_manual.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/env bash - -set -e - -REPO_ROOT="$(dirname "$0")/.." -# shellcheck source=scripts/common.sh -source "${REPO_ROOT}/scripts/common.sh" - -image="ghcr.io/argotorg/solc" - -if (( $# < 1 || $# > 3 )); then - fail "Usage: $0 [repo URL] [--no-push]" -fi - -branch="$1" -repo_url="${2:-https://github.com/argotorg/solidity.git}" - -if (( $# >= 3 )); then - [[ $3 == --no-push ]] || fail "Invalid flag: $3. Expected --no-push." - publish=false -else - publish=true -fi - -# NOTE: Login to GHCR before running this script with a PAT: -# echo $GHCR_TOKEN | docker login ghcr.io -u USERNAME --password-stdin -# -# Create a classic PAT with write:packages scope by visiting the following URL: -# https://github.com/settings/tokens/new?scopes=write:packages - -DIR=$(mktemp -d) -( -cd "$DIR" - -git clone --recursive --depth 2 "$repo_url" -b "$branch" solidity -cd solidity -commithash=$(git rev-parse --short=8 HEAD) -echo -n "$commithash" > commit_hash.txt -version=$("$(dirname "$0")/get_version.sh") -if [ "$branch" = v"$version" ] -then - echo -n > prerelease.txt -else - date -u +"nightly.%Y.%-m.%-d" > prerelease.txt -fi - -function tag_and_push -{ - docker tag "$image:$1" "$image:$2" - [[ $publish == false ]] || docker push "$image:$2" -} - -rm -rf .git -docker buildx build -t "$image":build -f scripts/Dockerfile . --progress=plain -tmp_container=$(docker create "$image":build sh) - -# Alpine image -mkdir -p upload -docker cp "${tmp_container}":/usr/bin/solc upload/solc-static-linux -docker buildx build -t "$image":build-alpine -f scripts/Dockerfile_alpine . --progress=plain - -if [ "$branch" = "develop" ] -then - 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 - 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 -) -rm -rf "$DIR"