Skip to content

Commit

Permalink
Add ARGs for cross-compiling
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
sixeyed committed May 23, 2017
1 parent a528cc1 commit 646fc97
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 646fc97

Please sign in to comment.