alertmanager icon indicating copy to clipboard operation
alertmanager copied to clipboard

chore: fix build of alertmanager without docker

Open jmichalek132 opened this issue 3 years ago • 3 comments

Hi, so we build alertmanager from source because of some internal requirements. We do this inside docker as part of multi stage build. We also don't have docker in docker available. We were using the NO_DOCKER env variable to make the build not use docker. However this does work on line 58, where DOCKER_RUN_CURRENT_USER is used instead DOCKER_CMD this one is not set to empty when NO_DOCKER env variable is set to true. This PR fixes that and makes the build work without docker available again.

jmichalek132 avatar Mar 15 '22 16:03 jmichalek132

Hi, @simonpasquier could you please take a look at this small change once you have some time?

Thank you in advance.

jmichalek132 avatar Mar 16 '22 14:03 jmichalek132

oh wait! Would this work as you expect? When I tried locally, I get rm: invalid option -- 'g' which makes sense looking at this part.

https://github.com/prometheus/alertmanager/blob/ec2f5f589402d8b45e327555d1330ce780354221/ui/app/Makefile#L58-L61

simonpasquier avatar Mar 16 '22 16:03 simonpasquier

oh wait! Would this work as you expect? When I tried locally, I get rm: invalid option -- 'g' which makes sense looking at this part.

https://github.com/prometheus/alertmanager/blob/ec2f5f589402d8b45e327555d1330ce780354221/ui/app/Makefile#L58-L61

That's interesting, yeah I what you are point out by for some reason it doesn't happen for us in our pipeline. Basically when I use the docker image we use for building alertmanager, set NO_DOCKER to true and run make scriptjs it works. I will look into it more.

jmichalek132 avatar Mar 16 '22 20:03 jmichalek132