Commit 75114024 authored by ale's avatar ale

Switch to multi-stage Dockerfile for hermetic builds

parent 995f8048
Pipeline #4215 failed
image: docker:latest
stages:
- build
- docker_build
- release
......@@ -13,16 +12,6 @@ variables:
RELEASE_TAG: $CI_REGISTRY_IMAGE:latest
GIT_SUBMODULE_STRATEGY: recursive
build:
stage: build
image: "ai/build:stretch"
script:
- env DEBIAN_FRONTEND=noninteractive apt-get -qy install make golang-go
- make
artifacts:
paths:
- build/
docker_build:
stage: docker_build
script:
......
FROM golang:1.11 AS build
ADD . /go/src/git.autistici.org/ai3/tools/float-dashboard
WORKDIR /go/src/git.autistici.org/ai3/tools/float-dashboard
RUN go build -o /float-dashboard .
FROM scratch
ADD build/float-dashboard /
COPY --from=build /float-dashboard /
CMD ["/float-dashboard"]
......@@ -117,5 +117,5 @@
"revisionTime": "2017-07-21T12:20:51Z"
}
],
"rootPath": "git.autistici.org/ai3/float-dashboard"
"rootPath": "git.autistici.org/ai3/tools/float-dashboard"
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment