-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Blomart Cedric
authored and
Blomart Cedric
committed
Sep 17, 2018
1 parent
280f09b
commit 432619b
Showing
1 changed file
with
2 additions
and
17 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 |
---|---|---|
@@ -1,28 +1,13 @@ | ||
# create archive of golang dependancies | ||
FROM golang:1.10 as builder | ||
FROM cblomart/gobasebuild as builder | ||
|
||
COPY Makefile Makefile | ||
RUN make godeps | ||
RUN tar -zcf /tmp/go.tgz -C /go/ ./ | ||
|
||
FROM docker AS docker | ||
|
||
# create a base image with necessary tooling and dependancies cache | ||
FROM golang:1.11 | ||
FROM cblomart/gobasebuild | ||
LABEL maintainer="[email protected]" | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
upx-ucl\ | ||
musl\ | ||
musl-tools &&\ | ||
apt-get clean &&\ | ||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
#RUN curl -SL https://download.docker.com/linux/static/stable/x86_64/docker-18.06.0-ce.tgz | tar -zxC /tmp &&\ | ||
# cp /tmp/docker/docker /usr/local/bin/docker &&\ | ||
# rm -rf /tmp/docker | ||
|
||
COPY --from=docker /usr/local/bin/docker /usr/local/bin/docker | ||
|
||
RUN mkdir -p /var/cache/drone | ||
COPY --from=builder /tmp/go.tgz /var/cache/drone/go.tgz |