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>
This commit is contained in:
parent
a528cc1fc3
commit
646fc9702c
1 changed files with 3 additions and 0 deletions
|
@ -3,6 +3,9 @@ FROM golang:1.8-alpine
|
|||
ENV DISTRIBUTION_DIR /go/src/github.com/docker/distribution
|
||||
ENV DOCKER_BUILDTAGS include_oss include_gcs
|
||||
|
||||
ARG GOOS=linux
|
||||
ARG GOARCH=amd64
|
||||
|
||||
RUN set -ex \
|
||||
&& apk add --no-cache make git
|
||||
|
||||
|
|
Loading…
Reference in a new issue