mirror of
https://github.com/kubernetes-sigs/prometheus-adapter.git
synced 2026-04-05 17:27:51 +00:00
Makefile: consolidate docker-build
As part of this commit, I upgraded the golang image used for building to 1.16 and consolidated how the docker-build rule was working. Previously, it was failing in master's CI because the go modules were not downloaded in the build image. To improve that, I replaced the combination of docker run and docker build by a multi-stage Dockerfile responsible for building the adapter and running it. In addition to that, I removed the `_output` directory completely as it wasn't really meaningful to have it anymore. I also removed the `build-local-image` rule as it was a duplicate of the `docker-build` rule with the only different of using a scratch base image. Also, since all the base images that we are using by default are based on busybox, I change the UID used in the image to 65534 which correspond to the nobody user in busybox. Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
This commit is contained in:
parent
815fa20931
commit
03e8eb8ddb
5 changed files with 40 additions and 29 deletions
|
|
@ -46,8 +46,7 @@ an x86_64 machine, use the `directxman12/k8s-prometheus-adapter-amd64`
|
|||
image.
|
||||
|
||||
If you're feeling adventurous, you can build the latest version of the
|
||||
custom metrics adapter by running `make docker-build` or `make
|
||||
build-local-image`.
|
||||
custom metrics adapter by running `make docker-build`.
|
||||
|
||||
Special thanks to [@luxas](https://github.com/luxas) for providing the
|
||||
demo application for this walkthrough.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue