add R sample function and readme

Signed-off-by: Chanyub Park <mrchypark@gmail.com>
This commit is contained in:
Chanyub Park
2017-09-01 00:00:40 +09:00
committed by Alex Ellis
parent d816f15193
commit fdb67e3d93
5 changed files with 103 additions and 0 deletions

View File

@ -0,0 +1,15 @@
FROM artemklevtsov/r-alpine:latest
ADD https://github.com/alexellis/faas/releases/download/0.6.1/fwatchdog /usr/bin
RUN chmod +x /usr/bin/fwatchdog
WORKDIR /root/
COPY handler.R .
ENV fprocess="Rscript handler.R"
HEALTHCHECK --interval=1s CMD [ -e /tmp/.lock ] || exit 1
CMD ["fwatchdog"]