Dockerfile updates
This commit is contained in:
28
Dockerfile
28
Dockerfile
@@ -1,23 +1,15 @@
|
|||||||
FROM golang:alpine as builder
|
FROM golang:1 as builder
|
||||||
COPY . /go/src/github.com/concourse/github-release-resource
|
COPY . /src
|
||||||
|
WORKDIR /src
|
||||||
ENV CGO_ENABLED 0
|
ENV CGO_ENABLED 0
|
||||||
ENV GOPATH /go/src/github.com/concourse/github-release-resource/Godeps/_workspace:${GOPATH}
|
RUN go get -d ./...
|
||||||
ENV PATH /go/src/github.com/concourse/github-release-resource/Godeps/_workspace/bin:${PATH}
|
RUN go build -o /assets/in ./cmd/in
|
||||||
RUN go build -o /assets/out github.com/concourse/github-release-resource/cmd/out
|
RUN go build -o /assets/out ./cmd/out
|
||||||
RUN go build -o /assets/in github.com/concourse/github-release-resource/cmd/in
|
RUN go build -o /assets/check ./cmd/check
|
||||||
RUN go build -o /assets/check github.com/concourse/github-release-resource/cmd/check
|
|
||||||
RUN set -e; for pkg in $(go list ./...); do \
|
|
||||||
go test -o "/tests/$(basename $pkg).test" -c $pkg; \
|
|
||||||
done
|
|
||||||
|
|
||||||
FROM alpine:edge AS resource
|
FROM alpine:edge AS resource
|
||||||
RUN apk add --update bash tzdata ca-certificates
|
RUN apk add --no-cache bash tzdata ca-certificates unzip zip gzip tar
|
||||||
COPY --from=builder /assets /opt/resource
|
COPY --from=builder assets/ /opt/resource/
|
||||||
|
RUN chmod +x /opt/resource/*
|
||||||
FROM resource AS tests
|
|
||||||
COPY --from=builder /tests /tests
|
|
||||||
RUN set -e; for test in /tests/*.test; do \
|
|
||||||
$test; \
|
|
||||||
done
|
|
||||||
|
|
||||||
FROM resource
|
FROM resource
|
||||||
|
Reference in New Issue
Block a user