-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump samples/versions - reduce image sizes through multi-stage builds
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
- Loading branch information
Showing
736 changed files
with
177,333 additions
and
185 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
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
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
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
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,16 +1,26 @@ | ||
FROM alpine:latest | ||
FROM golang:1.9.2-alpine as builder | ||
|
||
WORKDIR /root/ | ||
MAINTAINER alex@openfaas.com | ||
ENTRYPOINT [] | ||
|
||
EXPOSE 8080 | ||
ENV http_proxy "" | ||
ENV https_proxy "" | ||
RUN apk --no-cache add make curl \ | ||
&& curl -sL https://github.com/openfaas/faas/releases/download/0.6.9/fwatchdog > /usr/bin/fwatchdog \ | ||
&& chmod +x /usr/bin/fwatchdog | ||
|
||
ADD https://github.com/openfaas/faas/releases/download/0.5.1-alpha/fwatchdog /usr/bin | ||
# COPY fwatchdog /usr/bin/ | ||
RUN chmod +x /usr/bin/fwatchdog | ||
WORKDIR /go/src/github.com/openfaas/faas/sample-functions/ApiKeyProtected | ||
|
||
COPY app . | ||
COPY handler.go . | ||
# COPY vendor vendor | ||
|
||
ENV fprocess="/root/app" | ||
CMD ["fwatchdog"] | ||
RUN go install | ||
|
||
FROM alpine:3.6 | ||
|
||
# Needed to reach the hub | ||
RUN apk --no-cache add ca-certificates | ||
|
||
COPY --from=builder /usr/bin/fwatchdog /usr/bin/fwatchdog | ||
COPY --from=builder /go/bin/ApiKeyProtected /usr/bin/ApiKeyProtected | ||
ENV fprocess "/usr/bin/ApiKeyProtected" | ||
|
||
CMD ["/usr/bin/fwatchdog"] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
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
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
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
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,17 +1,26 @@ | ||
FROM golang:1.7.5-alpine | ||
MAINTAINER alexellis2@gmail.com | ||
FROM golang:1.9.2-alpine as builder | ||
|
||
MAINTAINER alex@openfaas.com | ||
ENTRYPOINT [] | ||
|
||
RUN apk --no-cache add make | ||
RUN apk --no-cache add make curl \ | ||
&& curl -sL https://github.com/openfaas/faas/releases/download/0.6.9/fwatchdog > /usr/bin/fwatchdog \ | ||
&& chmod +x /usr/bin/fwatchdog | ||
|
||
WORKDIR /go/src/github.com/openfaas/faas/sample-functions/DockerHubStats | ||
|
||
COPY . /go/src/github.com/openfaas/faas/sample-functions/DockerHubStats | ||
|
||
RUN make | ||
RUN make install | ||
|
||
ADD https://github.com/openfaas/faas/releases/download/0.6.0/fwatchdog /usr/bin | ||
RUN chmod +x /usr/bin/fwatchdog | ||
FROM alpine:3.6 | ||
|
||
ENV fprocess "/go/bin/DockerHubStats" | ||
HEALTHCHECK --interval=5s CMD [ -e /tmp/.lock ] || exit 1 | ||
# Needed to reach the hub | ||
RUN apk --no-cache add ca-certificates | ||
|
||
COPY --from=builder /usr/bin/fwatchdog /usr/bin/fwatchdog | ||
COPY --from=builder /go/bin/DockerHubStats /usr/bin/DockerHubStats | ||
ENV fprocess "/usr/bin/DockerHubStats" | ||
|
||
CMD [ "/usr/bin/fwatchdog"] | ||
HEALTHCHECK --interval=5s CMD [ -e /tmp/.lock ] || exit 1 | ||
CMD ["/usr/bin/fwatchdog"] |
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,17 +1,25 @@ | ||
FROM alexellis2/go-armhf:1.7.4 | ||
FROM golang:1.9.2-alpine as builder | ||
|
||
MAINTAINER alexellis2@gmail.com | ||
MAINTAINER alex@openfaas.com | ||
ENTRYPOINT [] | ||
|
||
RUN apk --no-cache add make | ||
RUN apk --no-cache add make curl \ | ||
&& curl -sL https://github.com/openfaas/faas/releases/download/0.6.9/fwatchdog-armhf > /usr/bin/fwatchdog \ | ||
&& chmod +x /usr/bin/fwatchdog | ||
|
||
WORKDIR /go/src/github.com/openfaas/faas/sample-functions/DockerHubStats | ||
|
||
COPY . /go/src/github.com/openfaas/faas/sample-functions/DockerHubStats | ||
|
||
RUN make | ||
RUN make install | ||
|
||
FROM alpine:3.6 | ||
|
||
COPY ./fwatchdog /usr/bin | ||
RUN chmod +x /usr/bin/fwatchdog | ||
# Needed to reach the hub | ||
RUN apk --no-cache add ca-certificates | ||
|
||
ENV fprocess "/go/bin/DockerHubStats" | ||
COPY --from=builder /usr/bin/fwatchdog /usr/bin/fwatchdog | ||
COPY --from=builder /go/bin/DockerHubStats /usr/bin/DockerHubStats | ||
ENV fprocess "/usr/bin/DockerHubStats" | ||
|
||
CMD [ "/usr/bin/fwatchdog"] | ||
CMD ["/usr/bin/fwatchdog"] |
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,9 +1,5 @@ | ||
|
||
.PHONY: install image | ||
.PHONY: install | ||
|
||
install: | ||
@go install . | ||
|
||
image: | ||
@docker build -t alexellis2/dockerhub-stats . | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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,16 +1,26 @@ | ||
FROM alpine:latest | ||
FROM golang:1.9.2-alpine as builder | ||
|
||
WORKDIR /root/ | ||
MAINTAINER alex@openfaas.com | ||
ENTRYPOINT [] | ||
|
||
EXPOSE 8080 | ||
ENV http_proxy "" | ||
ENV https_proxy "" | ||
RUN apk --no-cache add make curl \ | ||
&& curl -sL https://github.com/openfaas/faas/releases/download/0.6.9/fwatchdog > /usr/bin/fwatchdog \ | ||
&& chmod +x /usr/bin/fwatchdog | ||
|
||
ADD https://github.com/openfaas/faas/releases/download/v0.5-alpha/fwatchdog /usr/bin | ||
RUN chmod +x /usr/bin/fwatchdog | ||
# COPY fwatchdog /usr/bin/ | ||
WORKDIR /go/src/github.com/openfaas/faas/sample-functions/MarkdownRender | ||
|
||
COPY app . | ||
COPY handler.go . | ||
COPY vendor vendor | ||
|
||
ENV fprocess="/root/app" | ||
CMD ["fwatchdog"] | ||
RUN go install | ||
|
||
FROM alpine:3.6 | ||
|
||
# Needed to reach the hub | ||
RUN apk --no-cache add ca-certificates | ||
|
||
COPY --from=builder /usr/bin/fwatchdog /usr/bin/fwatchdog | ||
COPY --from=builder /go/bin/MarkdownRender /usr/bin/MarkdownRender | ||
ENV fprocess "/usr/bin/MarkdownRender" | ||
|
||
CMD ["/usr/bin/fwatchdog"] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.