Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker hub tags outdated raiden version as latest #5049

Closed
nephix opened this issue Oct 8, 2019 · 8 comments
Closed

Docker hub tags outdated raiden version as latest #5049

nephix opened this issue Oct 8, 2019 · 8 comments
Assignees
Labels
Component / CI Component / Tooling Issues that benefit from external tooling

Comments

@nephix
Copy link

nephix commented Oct 8, 2019

Problem Definition

When pulling the docker image raidennetwork/raiden:nightly, raidennetwork/raiden:latest or raidennetwork/raiden:v0.200.0-rc1 I would expect to get the latest RC.

Actual result

Docker pulled the version 0.100.5a1.dev504+g68448ac97:

$ docker run -it raidennetwork/raiden:v0.200.0-rc1
Unable to find image 'raidennetwork/raiden:v0.200.0-rc1' locally
v0.200.0-rc1: Pulling from raidennetwork/raiden
Digest: sha256:373170d05c6cb528e1502848b61c65b421e67564c71c7785d46da0f9662d8ec5
Status: Downloaded newer image for raidennetwork/raiden:v0.200.0-rc1
Welcome to Raiden, version 0.100.5a1.dev504+g68448ac97!
...

System Description

$ docker -v
Docker version 19.03.2, build 6a30dfc
@rakanalh rakanalh added Component / CI Component / Tooling Issues that benefit from external tooling labels Oct 8, 2019
@rakanalh rakanalh removed their assignment Oct 8, 2019
@konradkonrad
Copy link
Contributor

It seems, that the container was build from the develop branch, since on the master branch python setup.py --develop returns the correct RAIDENVERSION.

@rakanalh
Copy link
Contributor

rakanalh commented Oct 8, 2019

@konradkonrad where do we build/push the docker container?

@konradkonrad
Copy link
Contributor

circleCI has a docker stage for nightly builds. still trying to figure out, where the release builds are generated

@konradkonrad
Copy link
Contributor

the version tagged releases are auto-build from dockerhub. I disabled the "build caching" for the release builds and try to retrigger a build

@konradkonrad
Copy link
Contributor

I found the culprit in the build logs from dockerhub for Build in 'v0.200.0-rc1:/docker/Dockerfile' :

Step 3/13 : ARG RAIDENVERSION=develop
---> Running in 1afe700a0631

@konradkonrad
Copy link
Contributor

this "fails", because on dockerhub, there is no build argument provided, and instead the default is used:

# use --build-arg RAIDENVERSION=v0.0.3 to build a specific (tagged) version
ARG REPO=raiden-network/raiden
ARG RAIDENVERSION=develop

@konradkonrad
Copy link
Contributor

We will need to optionally set Build Environment Variables (on dockerhub build settings) for tagged releases, so that RAIDENVERSION=${SOURCE_BRANCH} (see https://docs.docker.com/docker-hub/builds/advanced/), when building a tagged commit.

I am not sure if this is going to work (or break other things), but I will try.

@konradkonrad
Copy link
Contributor

okay, it seems that we need to add a build hook in order to pass SOURCE_BRANCH as RAIDENVERSION. See: docker/hub-feedback#508 especially docker/hub-feedback#508 (comment)

konradkonrad added a commit to konradkonrad/raiden that referenced this issue Oct 8, 2019
This should fix raiden-network#5049

In order to build the proper raiden version from `Dockerfile`, we need
to pass the intended `RAIDENVERSION` build argument. According to
docker/hub-feedback#508 the current way of
doing this is via build hook.
dockerhub has the `SOURCE_BRANCH` environment variable available, that
should translate just fine to the values we want in `RAIDENVERSION`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component / CI Component / Tooling Issues that benefit from external tooling
Projects
None yet
Development

No branches or pull requests

3 participants