diff --git a/.github/legacy/Dockerfile.goipfs-stub b/.github/legacy/Dockerfile.goipfs-stub deleted file mode 100644 index 74bed264d..000000000 --- a/.github/legacy/Dockerfile.goipfs-stub +++ /dev/null @@ -1,26 +0,0 @@ -# syntax=docker/dockerfile:1 -# Stub Dockerfile for the deprecated 'ipfs/go-ipfs' image name. -# This image redirects users to the new 'ipfs/kubo' name. -FROM busybox:stable-glibc - -# Copy stub entrypoint that displays deprecation message -COPY .github/legacy/goipfs_stub.sh /usr/local/bin/ipfs - -# Make it executable -RUN chmod +x /usr/local/bin/ipfs - -# Use the same ports as the real image for compatibility -EXPOSE 4001 4001/udp 5001 8080 8081 - -# Create ipfs user for consistency -ENV IPFS_PATH=/data/ipfs -RUN mkdir -p $IPFS_PATH \ - && adduser -D -h $IPFS_PATH -u 1000 -G users ipfs \ - && chown ipfs:users $IPFS_PATH - -# Run as ipfs user -USER ipfs - -# The stub script will run and exit with an error message -ENTRYPOINT ["/usr/local/bin/ipfs"] -CMD ["daemon"] diff --git a/.github/legacy/goipfs_stub.sh b/.github/legacy/goipfs_stub.sh deleted file mode 100755 index 15185ce7e..000000000 --- a/.github/legacy/goipfs_stub.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -# Stub script for the deprecated 'ipfs/go-ipfs' Docker image. -# This informs users to switch to 'ipfs/kubo'. - -cat >&2 <<'EOF' -ERROR: The name 'go-ipfs' is no longer used. - -Please update your Docker scripts to use 'ipfs/kubo' instead of 'ipfs/go-ipfs'. - -For example: - docker pull ipfs/kubo:release - -More information: - - https://github.com/ipfs/kubo#docker - - https://hub.docker.com/r/ipfs/kubo - - https://docs.ipfs.tech/install/run-ipfs-inside-docker/ - -EOF - -exit 1 diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 522ea8b11..39eaf52f4 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -141,52 +141,3 @@ jobs: cache-to: | type=gha,mode=max type=registry,ref=${{ env.IMAGE_NAME }}:buildcache,mode=max - - # Build and push stub image to the legacy ipfs/go-ipfs name - # This redirects users to use ipfs/kubo instead - legacy-name: - needs: docker-hub - if: github.repository == 'ipfs/kubo' || github.event_name == 'workflow_dispatch' - name: Push stub to legacy ipfs/go-ipfs name - runs-on: ubuntu-latest - timeout-minutes: 5 - env: - LEGACY_IMAGE_NAME: ipfs/go-ipfs - steps: - - name: Check out the repo - uses: actions/checkout@v6 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Log in to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ vars.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Convert tags to legacy image name - id: legacy_tags - run: | - TAGS="${{ github.event.inputs.tags || needs.docker-hub.outputs.tags }}" - if ! echo "$TAGS" | grep -q "kubo"; then - echo "ERROR: Tags must contain kubo image name" - exit 1 - fi - echo "value<> $GITHUB_OUTPUT - echo "$TAGS" | sed "s|ipfs/kubo|$LEGACY_IMAGE_NAME|g" >> $GITHUB_OUTPUT - echo "EOF" >> $GITHUB_OUTPUT - shell: bash - - - if: github.event_name != 'workflow_dispatch' || github.event.inputs.push == 'true' - name: Build and push legacy stub image - uses: docker/build-push-action@v6 - with: - platforms: linux/amd64,linux/arm/v7,linux/arm64/v8 - context: . - push: true - file: ./.github/legacy/Dockerfile.goipfs-stub - tags: ${{ steps.legacy_tags.outputs.value }} diff --git a/bin/get-docker-tags.sh b/bin/get-docker-tags.sh index 19f218a27..f28ce7234 100755 --- a/bin/get-docker-tags.sh +++ b/bin/get-docker-tags.sh @@ -41,7 +41,7 @@ if [[ $GIT_TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+-rc ]]; then elif [[ $GIT_TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then echoImageName "$GIT_TAG" echoImageName "latest" - echoImageName "release" # see: https://github.com/ipfs/go-ipfs/issues/3999#issuecomment-742228981 + echoImageName "release" # see: https://github.com/ipfs/kubo/issues/3999#issuecomment-742228981 elif [[ $GIT_BRANCH =~ ^bifrost-.* ]]; then # sanitize the branch name since docker tags have stricter char limits than git branch names diff --git a/bin/push-docker-tags.sh b/bin/push-docker-tags.sh index a33948307..33b2550fb 100755 --- a/bin/push-docker-tags.sh +++ b/bin/push-docker-tags.sh @@ -7,7 +7,7 @@ # Run from ci to tag images based on the current branch or tag name. # A bit like dockerhub autobuild config, but somewhere we can version control it. # -# The `docker-build` job builds the current commit in docker and tags it as ipfs/go-ipfs:wip +# The `docker-build` job builds the current commit in docker and tags it as ipfs/kubo:wip # # Then the `docker-publish` job runs this script to decide what tag, if any, # to publish to dockerhub. @@ -42,7 +42,7 @@ GIT_TAG=${4:-$(git describe --tags --exact-match || echo "")} DRY_RUN=${5:-false} WIP_IMAGE_TAG=${WIP_IMAGE_TAG:-wip} -IMAGE_NAME=${IMAGE_NAME:-ipfs/go-ipfs} +IMAGE_NAME=${IMAGE_NAME:-ipfs/kubo} pushTag () { local IMAGE_TAG=$1 @@ -63,7 +63,7 @@ if [[ $GIT_TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+-rc ]]; then elif [[ $GIT_TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then pushTag "$GIT_TAG" pushTag "latest" - pushTag "release" # see: https://github.com/ipfs/go-ipfs/issues/3999#issuecomment-742228981 + pushTag "release" # see: https://github.com/ipfs/kubo/issues/3999#issuecomment-742228981 elif [[ $GIT_BRANCH =~ ^bifrost-.* ]]; then # sanitize the branch name since docker tags have stricter char limits than git branch names