mirror of
https://github.com/openfaas/faas.git
synced 2025-06-28 01:33:24 +00:00
This updates alpine version to 3.7 in sample-functions, gateway and some markdown docas. Signed-off-by: Ivana Yovcheva (VMware) <iyovcheva@vmware.com>
29 lines
624 B
Docker
29 lines
624 B
Docker
FROM alpine:3.7 as builder
|
|
RUN apk add --no-cache curl \
|
|
&& curl -SL https://github.com/openfaas/faas/releases/download/0.8.0/fwatchdog > /usr/bin/fwatchdog \
|
|
&& chmod +x /usr/bin/fwatchdog \
|
|
&& apk --no-cache del curl
|
|
|
|
WORKDIR /root/
|
|
|
|
RUN apk add --no-cache gcc \
|
|
musl-dev
|
|
COPY main.c .
|
|
|
|
RUN gcc main.c -static -o /main \
|
|
&& chmod +x /main \
|
|
&& /main
|
|
|
|
FROM scratch
|
|
|
|
COPY --from=builder /main /
|
|
COPY --from=builder /usr/bin/fwatchdog /
|
|
COPY --from=builder /tmp /tmp
|
|
|
|
ENV fprocess="/main"
|
|
|
|
HEALTHCHECK --interval=5s CMD [ -e /tmp/.lock ] || exit 1
|
|
|
|
CMD ["/fwatchdog"]
|
|
|