mirror of
				https://github.com/prometheus/node_exporter.git
				synced 2025-08-20 18:33:52 -07:00 
			
		
		
		
	Merge pull request #31 from prometheus/simplify-dockerfile
Simplify Dockerfile by using golang:onbuild image
This commit is contained in:
		
						commit
						6d7e08e78b
					
				
							
								
								
									
										16
									
								
								Dockerfile
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								Dockerfile
									
									
									
									
									
								
							|  | @ -1,16 +1,6 @@ | ||||||
| FROM       ubuntu:13.10 | FROM       golang:onbuild | ||||||
| MAINTAINER Prometheus Team <prometheus-developers@googlegroups.com> | MAINTAINER Prometheus Team <prometheus-developers@googlegroups.com> | ||||||
| 
 | 
 | ||||||
| RUN        apt-get update && apt-get install -yq curl git mercurial gcc | ENTRYPOINT [ "go-wrapper", "run" ] | ||||||
| RUN        curl -s https://go.googlecode.com/files/go1.2.linux-amd64.tar.gz | tar -C /usr/local -xzf - | CMD        [ "-logtostderr" ] | ||||||
| ENV        PATH    /usr/local/go/bin:$PATH |  | ||||||
| ENV        GOPATH  /go |  | ||||||
| 
 |  | ||||||
| ADD        . /usr/src/node_exporter |  | ||||||
| RUN        cd /usr/src/node_exporter && \ |  | ||||||
|            go get -d && go build && cp node_exporter / |  | ||||||
| RUN        printf '{ "scrapeInterval": 10, "attributes": {} }' > \ |  | ||||||
|                   node_exporter.conf |  | ||||||
| 
 |  | ||||||
| ENTRYPOINT [ "/node_exporter" ] |  | ||||||
| EXPOSE     8080 | EXPOSE     8080 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue