forked from docker-archive/oscalkit
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Makefile changes and add Dockerfile (docker-archive#25)
- Loading branch information
1 parent
432e437
commit 8122616
Showing
2 changed files
with
42 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# oscalkit - OSCAL conversion utility | ||
# Written in 2017 by Andrew Weiss <andrew.weiss@docker.com> | ||
|
||
# To the extent possible under law, the author(s) have dedicated all copyright | ||
# and related and neighboring rights to this software to the public domain worldwide. | ||
# This software is distributed without any warranty. | ||
|
||
# You should have received a copy of the CC0 Public Domain Dedication along with this software. | ||
# If not, see <http://creativecommons.org/publicdomain/zero/1.0/>. | ||
|
||
FROM golang:1.11 AS race-detector | ||
WORKDIR /go/src/github.com/opencontrol/oscalkit | ||
COPY . . | ||
WORKDIR /go/src/github.com/opencontrol/oscalkit/cli | ||
RUN go build -race | ||
|
||
FROM golang:1.11 | ||
ARG GOOS | ||
ARG GOARCH | ||
ARG VERSION | ||
ARG BUILD | ||
ARG DATE | ||
ARG BINARY | ||
WORKDIR /go/src/github.com/opencontrol/oscalkit | ||
COPY --from=race-detector /go/src/github.com/opencontrol/oscalkit . | ||
WORKDIR /go/src/github.com/opencontrol/oscalkit/cli | ||
RUN CGO_ENABLED=0 GOOS=${GOOS} GOARCH=${GOARCH} go build -o /${BINARY} -v -ldflags "-s -w -X github.com/opencontrol/oscalkit/cli/version.Version=${VERSION} -X github.com/opencontrol/oscalkit/cli/version.Build=${BUILD} -X github.com/opencontrol/oscalkit/cli/version.Date=${DATE}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters