might go faster now, who knows
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is passing
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	continuous-integration/drone/push Build is passing
				
			This commit is contained in:
		
							parent
							
								
									a1cb2bfcd4
								
							
						
					
					
						commit
						e68027843d
					
				
							
								
								
									
										18
									
								
								Dockerfile
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								Dockerfile
									
									
									
									
									
								
							| @ -1,15 +1,21 @@ | |||||||
|  | ## build image: | ||||||
| FROM golang:1.15 as builder | FROM golang:1.15 as builder | ||||||
| 
 | 
 | ||||||
| RUN mkdir /build | RUN mkdir -p /go/src/git.eeqj.de/sneak/formless | ||||||
| ADD . /build/ | WORKDIR /go/src/git.eeqj.de/sneak/formless | ||||||
| WORKDIR /build | 
 | ||||||
|  | COPY go.mod . | ||||||
|  | COPY go.sum . | ||||||
|  | RUN go mod download | ||||||
|  | 
 | ||||||
|  | ADD . /go/src/git.eeqj.de/sneak/formless/ | ||||||
| RUN make build | RUN make build | ||||||
| 
 | 
 | ||||||
| 
 | ## output image: | ||||||
| FROM scratch | FROM scratch | ||||||
| 
 | 
 | ||||||
| COPY --from=builder /build/formless /app/formless | COPY --from=builder /go/src/git.eeqj.de/sneak/formless/formless /app/formless | ||||||
| COPY --from=builder /go /goarchive | COPY --from=builder /go /go.archive | ||||||
| 
 | 
 | ||||||
| WORKDIR /app | WORKDIR /app | ||||||
| 
 | 
 | ||||||
|  | |||||||
							
								
								
									
										8
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								Makefile
									
									
									
									
									
								
							| @ -59,22 +59,22 @@ test: lint build-docker-image | |||||||
| is_uncommitted: | is_uncommitted: | ||||||
| 	git diff --exit-code >/dev/null 2>&1 | 	git diff --exit-code >/dev/null 2>&1 | ||||||
| 
 | 
 | ||||||
| docker-build: | docker: | ||||||
| 	docker build -t $(IMAGENAME) . | 	docker build -t $(IMAGENAME) . | ||||||
| 
 | 
 | ||||||
| build-docker-image-dist: is_uncommitted clean | build-docker-image-dist: is_uncommitted clean | ||||||
| 	docker build -t $(IMAGENAME):$(VERSION) -t $(IMAGENAME):latest -t $(IMAGENAME):$(BUILDTIMETAG) . | 	docker build -t $(IMAGENAME):$(VERSION) -t $(IMAGENAME):latest -t $(IMAGENAME):$(BUILDTIMETAG) . | ||||||
| 
 | 
 | ||||||
| dist: lint docker-build | dist: lint docker | ||||||
| 	-mkdir -p ./output | 	-mkdir -p ./output | ||||||
| 	docker run --rm --entrypoint cat $(IMAGENAME) /bin/$(FN) > output/$(FN) | 	docker run --rm --entrypoint cat $(IMAGENAME) /bin/$(FN) > output/$(FN) | ||||||
| 	docker save $(IMAGENAME) | bzip2 > output/$(BUILDTIMEFILENAME).$(FN).tbz2 | 	docker save $(IMAGENAME) | bzip2 > output/$(BUILDTIMEFILENAME).$(FN).tbz2 | ||||||
| 
 | 
 | ||||||
| hub: upload-docker-image | hub: upload-docker-image | ||||||
| 
 | 
 | ||||||
| upload-docker-image: docker-build | upload-docker-image: docker | ||||||
| 	docker push $(IMAGENAME):$(VERSION) | 	docker push $(IMAGENAME):$(VERSION) | ||||||
| 	docker push $(IMAGENAME):$(BUILDTIMETAG) | 	docker push $(IMAGENAME):$(BUILDTIMETAG) | ||||||
| 	docker push $(IMAGENAME):latest | 	docker push $(IMAGENAME):latest | ||||||
| 
 | 
 | ||||||
| .PHONY: build fmt test is_uncommitted docker-build dist hub upload-docker-image clean run rundebug default build-docker-image-dist | .PHONY: build fmt test is_uncommitted docker dist hub upload-docker-image clean run rundebug default build-docker-image-dist | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user