Add ARGs for cross-compiling
Add build args. Defaults to Linux/x64 so no change to existing image, but can build for other platforms - e.g. ``` docker build --build-arg GOOS=windows -t distribution-builder:windows . ``` Signed-off-by: Elton Stoneman <elton@sixeyed.com>master
							parent
							
								
									a528cc1fc3
								
							
						
					
					
						commit
						646fc9702c
					
				|  | @ -3,6 +3,9 @@ FROM golang:1.8-alpine | ||||||
| ENV DISTRIBUTION_DIR /go/src/github.com/docker/distribution | ENV DISTRIBUTION_DIR /go/src/github.com/docker/distribution | ||||||
| ENV DOCKER_BUILDTAGS include_oss include_gcs | ENV DOCKER_BUILDTAGS include_oss include_gcs | ||||||
| 
 | 
 | ||||||
|  | ARG GOOS=linux | ||||||
|  | ARG GOARCH=amd64 | ||||||
|  | 
 | ||||||
| RUN set -ex \ | RUN set -ex \ | ||||||
|     && apk add --no-cache make git |     && apk add --no-cache make git | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue