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

Dockerfile is not granular enough #445

Closed
swsnider opened this Issue Jan 10, 2015 · 4 comments

Comments

Projects
None yet
3 participants
@swsnider
Copy link
Contributor

swsnider commented Jan 10, 2015

It would be a lot easier to work with the Dockerfile if the part where it downloads and compiles the Go toolchain was a seperate RUN step from the compilation of prometheus, since otherwise it attempts to download and build Go every. single. time. you. run. docker. build.

@juliusv

This comment has been minimized.

Copy link
Member

juliusv commented Jan 10, 2015

@discordianfish

This comment has been minimized.

Copy link
Member

discordianfish commented Jan 11, 2015

@juliusv That's due to the fact that we're using the Makefile so we're using the same path to build with and without Docker. I can change it to use the golang base image which would be benificial for all Docker uses because of faster build and better reuse of images, but you suggest you also try to build the Docker image each time you change something (should be possible with travis/done etc I guess?).

@juliusv

This comment has been minimized.

Copy link
Member

juliusv commented Jan 11, 2015

@discordianfish Hmm, the Makefile currently takes care of some things you'd have to duplicate if you didn't use it:

  • creating a build environment with the right Go version and right versions of vendored dependencies (via godeps)
  • generating the build.go file with build information
  • potentially regenerating other things, but those are usually checked in anyways (lexer/parser/asset/protobuf files)

Btw., Go is downloaded every time now, but it's already a built package, so it's not actually compiled.

Docker-newbie question: Would it be possible to split the Dockerfile into two RUN steps: 1) make dependencies, 2) make build?

👍 to building the Docker image as part of a CI test.

@juliusv juliusv closed this in #448 Jan 19, 2015

simonpasquier pushed a commit to simonpasquier/prometheus that referenced this issue Oct 12, 2017

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 24, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.