-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
feat: Build own docker image and use ghcr #11768
Conversation
Steps to putting this into action:
Breaking is a feature, not a bug. When Go is out of date on my laptop, it yells at me, and I update it, and I imagine that is the same for >95% of developers using the cosmos-sdk To enhance this property, we could use a cron job to build and push this image. The possible downside to this is that we would need to keep our dependencies up to date. to test this out: docker pull faddat/archlinux
docker run faddat/archlinux /bin/bash
pacman -Syyu go rocksdb cleveldb git python base-devel
git clone https://github.com/cosmos/cosmos-sdk build with rocksdb enabled, if you'd like to -- but use grocksdb branch |
NB: in places where I'm using the "blank" image, we can change to the one in the repo root post merge |
This PR eliminates the dependency on faddat/archlinux-docker |
@@ -0,0 +1,22 @@ | |||
# Server list generated by rankmirrors on 2020-04-17 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we create a new repo for this fork. IM weary of adding it directly in the sdk.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because of the mirrorlist?
I could update it. The reason that I'd like to put it here is that if it is here, we build a complete multiplatform development environmentn in the cosmos sdk each hour and in the future developers (like me) will not have to run around the internet trying to figure out where the db build system image is built (oop, it was tmdb's or wait was it iavl and who is tendermint-dev, anyway?)
There's still too much cruft here. I will clean it up and then bring it out of draft. |
@faddat did you have a chance to talk with rick? His idea of layers would make this pr able to be pushed across the finish line |
@@ -0,0 +1,35 @@ | |||
Server = https://mirror.arizona.edu/archlinux/$repo/os/$arch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, if we take the path of making our own image from scratch. They are the mirror lists for packages.
|
||
FROM golang:1.18-alpine | ||
FROM faddat/archlinux |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this image needs changing? Seems fine here since this isn't used anywhere other than proto generation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea is to move down to a single image that we use everywhere, so that there are fewer layers. We need to bootstrap, though. This is one of many urls that would change to something like ghcr.io/cosmos/cosmos-sdk or such.
@faddat any chance you want to complete this? otherwise lets close it |
Yes, I do want to complete it. |
This PR is kinda-sorta blocking #12842 Basically, this one will let us publish an up to date build environment from the main branch. In this case that'd be go 1.19, but I have seen others. I am amenable to moving this to another repo, though I do basically maintain it at https://github.com/notional-labs/containers Just want to again note that merging this means that we depend on an external repo-- but for about 1 hour. Once it is merged, we get our own images hosted on ghcr. Those images stay up to date because we will be using a rolling-release linux, and they're made once an hour. |
closing this for the time being. Doing a close pr round to clean up things |
Description
Closes: #11657
Closes: #11688
This PR changes the Dockerfile in the repository root to a rolling-release Docker image that is built here and keeps itself up to date.
Simapp and other docker images that come from the SDK could start with this.
In CI, we could set it up to build this, and push it only when it is on main. The main branch's docker image becomes canonical for current and past versions of the cosmos-sdk, and can be used in tm-db and iavl testing, too.
Merging this
This PR comes in two stages:
Once this is merged we can immediately clear dependencies that aren't in this repository because we will get ghcr.io/cosmos/cosmos-sdk
images.
Matienance
These images do not have a tagged go version. Like developer laptops, they will always use the latest
go
, the latestrocksdb
, and the latestleveldb
. This way, our CI system will more closely reflect a developer laptop.Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change