Add build files

This commit is contained in:
faizanahmad055
2018-07-06 20:28:23 +05:00
parent 5920890fa3
commit ee079a4684
4 changed files with 34 additions and 1 deletions

1
.gitignore vendored
View File

@@ -6,5 +6,4 @@ release
out/
_gopath/
.DS_Store
build
vendor

5
build/package/Dockerfile Normal file
View File

@@ -0,0 +1,5 @@
FROM scratch
ENTRYPOINT ["/reloader"]
COPY ./reloader /

View File

@@ -0,0 +1,21 @@
FROM stakater/go-glide:1.9.3
MAINTAINER "Stakater Team"
RUN apk update
RUN apk -v --update \
add git build-base && \
rm -rf /var/cache/apk/* && \
mkdir -p "$GOPATH/src/github.com/stakater/Reloader"
ADD . "$GOPATH/src/github.com/stakater/Reloader"
RUN cd "$GOPATH/src/github.com/stakater/Reloader" && \
glide update && \
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a --installsuffix cgo --ldflags="-s" -o /Reloader
COPY build/package/Dockerfile.run /
# Running this image produces a tarball suitable to be piped into another
# Docker build command.
CMD tar -cf - -C / Dockerfile.run Reloader

View File

@@ -0,0 +1,8 @@
FROM alpine:3.4
MAINTAINER "Stakater Team"
RUN apk add --update ca-certificates
COPY Reloader /bin/Reloader
ENTRYPOINT ["/bin/Reloader"]