Skip to content
Snippets Groups Projects
Commit b9240fe4 authored by Marcin Rataj's avatar Marcin Rataj
Browse files

refactor(docker): publish images under both names

This ensures we keep publishing the same image under both names:

    $ ./bin/get-docker-tags.sh $(date -u +%F) 88d88158 master                                                                                                                                 ...chore/rename-to-banana
    ipfs/kubo:master-2022-06-21-88d88158
    ipfs/go-ipfs:master-2022-06-21-88d88158
    ipfs/kubo:master-latest
    ipfs/go-ipfs:master-latest
parent 5cb57266
No related branches found
No related tags found
No related merge requests found
...@@ -11,11 +11,12 @@ on: ...@@ -11,11 +11,12 @@ on:
jobs: jobs:
push_to_registry: push_to_registry:
if: github.repository == 'ipfs/go-ipfs' || github.event_name == 'workflow_dispatch' if: github.repository == 'ipfs/go-ipfs' || github.repository == 'ipfs/kubo' || github.event_name == 'workflow_dispatch'
name: Push Docker image to Docker Hub name: Push Docker image to Docker Hub
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
IMAGE_NAME: ipfs/go-ipfs IMAGE_NAME: ipfs/kubo
LEGACY_IMAGE_NAME: ipfs/go-ipfs
steps: steps:
- name: Check out the repo - name: Check out the repo
uses: actions/checkout@v2 uses: actions/checkout@v2
......
...@@ -8,7 +8,7 @@ RUN apt-get update && apt-get install -y \ ...@@ -8,7 +8,7 @@ RUN apt-get update && apt-get install -y \
ca-certificates \ ca-certificates \
fuse fuse
ENV SRC_DIR /go-ipfs ENV SRC_DIR /kubo
# Download packages first so they can be cached. # Download packages first so they can be cached.
COPY go.mod go.sum $SRC_DIR/ COPY go.mod go.sum $SRC_DIR/
...@@ -51,7 +51,7 @@ FROM busybox:1.31.1-glibc ...@@ -51,7 +51,7 @@ FROM busybox:1.31.1-glibc
LABEL maintainer="Steven Allen <steven@stebalien.com>" LABEL maintainer="Steven Allen <steven@stebalien.com>"
# Get the ipfs binary, entrypoint script, and TLS CAs from the build container. # Get the ipfs binary, entrypoint script, and TLS CAs from the build container.
ENV SRC_DIR /go-ipfs ENV SRC_DIR /kubo
COPY --from=0 $SRC_DIR/cmd/ipfs/ipfs /usr/local/bin/ipfs COPY --from=0 $SRC_DIR/cmd/ipfs/ipfs /usr/local/bin/ipfs
COPY --from=0 $SRC_DIR/bin/container_daemon /usr/local/bin/start_ipfs COPY --from=0 $SRC_DIR/bin/container_daemon /usr/local/bin/start_ipfs
COPY --from=0 $SRC_DIR/bin/container_init_run /usr/local/bin/container_init_run COPY --from=0 $SRC_DIR/bin/container_init_run /usr/local/bin/container_init_run
......
...@@ -105,9 +105,12 @@ If your system is resource-constrained, we recommend: ...@@ -105,9 +105,12 @@ If your system is resource-constrained, we recommend:
### Docker ### Docker
[![Docker Image Version (latest semver)](https://img.shields.io/docker/v/ipfs/go-ipfs?color=blue&label=go-ipfs%20docker%20image&logo=docker&sort=semver&style=flat-square&cacheSeconds=3600)](https://hub.docker.com/r/ipfs/go-ipfs/) [![Docker Image Version (legacy name)](https://img.shields.io/docker/v/ipfs/go-ipfs?color=blue&label=go-ipfs%20docker%20image&logo=docker&sort=semver&style=flat-square&cacheSeconds=3600)](https://hub.docker.com/r/ipfs/go-ipfs/)
<!-- TODO: replace with kubo after we have minimum set of images after kubo 0.14 (stable semver release, 'latest' and 'release' docker tags)
[![Docker Image Version (latest semver)](https://img.shields.io/docker/v/ipfs/kubo?color=blue&label=kubo%20docker%20image&logo=docker&sort=semver&style=flat-square&cacheSeconds=3600)](https://hub.docker.com/r/ipfs/kubo/)
-->
More info on how to run kubo inside docker can be found [here](https://docs.ipfs.io/how-to/run-ipfs-inside-docker/). More info on how to run kubo (go-ipfs) inside Docker can be found [here](https://docs.ipfs.io/how-to/run-ipfs-inside-docker/).
### Native Linux package managers ### Native Linux package managers
......
...@@ -29,13 +29,15 @@ BUILD_NUM=$1 ...@@ -29,13 +29,15 @@ BUILD_NUM=$1
GIT_SHA1=${2:-$(git rev-parse HEAD)} GIT_SHA1=${2:-$(git rev-parse HEAD)}
GIT_SHA1_SHORT=$(echo "$GIT_SHA1" | cut -c 1-7) GIT_SHA1_SHORT=$(echo "$GIT_SHA1" | cut -c 1-7)
GIT_BRANCH=${3:-$(git symbolic-ref -q --short HEAD || echo "unknown")} GIT_BRANCH=${3:-$(git symbolic-ref -q --short HEAD || echo "unknown")}
GIT_TAG=${4:-$(git describe --tags --exact-match || echo "")} GIT_TAG=${4:-$(git describe --tags --exact-match 2> /dev/null || echo "")}
IMAGE_NAME=${IMAGE_NAME:-ipfs/go-ipfs} IMAGE_NAME=${IMAGE_NAME:-ipfs/kubo}
LEGACY_IMAGE_NAME=${LEGACY_IMAGE_NAME:-ipfs/go-ipfs}
echoImageName () { echoImageName () {
local IMAGE_TAG=$1 local IMAGE_TAG=$1
echo "$IMAGE_NAME:$IMAGE_TAG" echo "$IMAGE_NAME:$IMAGE_TAG"
echo "$LEGACY_IMAGE_NAME:$IMAGE_TAG"
} }
if [[ $GIT_TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+-rc ]]; then if [[ $GIT_TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+-rc ]]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment