-
Notifications
You must be signed in to change notification settings - Fork 265
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
Update docker.yml and Dockerfile, fix ci #466
Changes from 4 commits
2f3f512
dc2edd7
f6b6637
1531cd0
1349167
96b10ec
caadc82
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,12 @@ | ||
FROM golang:1.14 as build | ||
|
||
WORKDIR /iavl | ||
# This docker image is designed to be used in CI for benchmarks and also by developers wanting an environment that always has the lastest rocksdb and cleveldb. | ||
FROM faddat/archlinux | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. how about using one of the official arch or alpine linux distros? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ping There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hey sure thing, but ah, that means alpine and thus musl. I maintain that image because Arch isn't multiarch by default. If we then search for distros with really rigorously up to date rolling release package management, we come up emptdy. What do you think? That image is built here: https://github.com/faddat/archlinux-docker/runs/5964553569?check_suite_focus=true Here's how it works: it makes amd64 it combines them into the same manifest and then pushes to docker hub daily. Since few use musl for real, using alpine as build distro invites pain in the form of build environments that don't match runtime environments. If popularity / adoption / usage matters, I do think it is the leading multiarch arch linux image on docker hub. |
||
|
||
ARG GOFLAGS="" | ||
ENV GOFLAGS=$GOFLAGS | ||
ENV GO111MODULE=on | ||
|
||
# Download dependencies first - this should be cacheable. | ||
COPY go.mod go.sum ./ | ||
RUN go mod download | ||
RUN pacman -Syyu --noconfirm leveldb rocksdb go base-devel | ||
|
||
# Now add the local iavl repo, which typically isn't cacheable. | ||
COPY . . | ||
|
||
# Build the server. | ||
RUN go get ./cmd/iavlserver | ||
|
||
# Make a minimal image. | ||
FROM gcr.io/distroless/base | ||
|
||
COPY --from=build /go/bin/iavlserver / | ||
|
||
EXPOSE 8090 8091 | ||
ENTRYPOINT ["/iavlserver"] | ||
CMD ["-db-name", "iavl", "-datadir", "."] | ||
RUN go install -tags cleveldb,rocksdb,badgerdb cmd/... |
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.
love this!! we should migrate everything we have to this
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.
so, ok-- this is a package deal with the above docker image, at least in my experience the multiarch stuff. Let me see what I can do.