diff --git a/template/node-armhf/Dockerfile b/template/node-armhf/Dockerfile new file mode 100644 index 000000000..0ff1f7559 --- /dev/null +++ b/template/node-armhf/Dockerfile @@ -0,0 +1,29 @@ +FROM arm32v6/alpine:3.6 + +RUN apk add --no-cache nodejs nodejs-npm ca-certificates +RUN apk --no-cache add curl \ + && echo "Pulling watchdog binary from Github." \ + && curl -sSL https://github.com/alexellis/faas/releases/download/0.6.0/fwatchdog-armhf > /usr/bin/fwatchdog \ + && chmod +x /usr/bin/fwatchdog \ + && apk del curl --no-cache + +WORKDIR /root/ + +COPY package.json . + +RUN npm i +COPY index.js . +COPY function function +WORKDIR /root/function + +ENV NPM_CONFIG_LOGLEVEL warn +RUN npm i || : +WORKDIR /root/ + +ENV cgi_headers="true" + +ENV fprocess="node index.js" + +HEALTHCHECK --interval=1s CMD [ -e /tmp/.lock ] || exit 1 + +CMD ["fwatchdog"] diff --git a/template/python-armhf/Dockerfile b/template/python-armhf/Dockerfile new file mode 100644 index 000000000..7e48e8d3d --- /dev/null +++ b/template/python-armhf/Dockerfile @@ -0,0 +1,29 @@ +FROM armhf/python:2.7-alpine +# Alternatively use ADD https:// (which will not be cached by Docker builder) +RUN apk --no-cache add curl \ + && echo "Pulling watchdog binary from Github." \ + && curl -sSL https://github.com/alexellis/faas/releases/download/0.6.0/fwatchdog-armhf > /usr/bin/fwatchdog \ + && chmod +x /usr/bin/fwatchdog \ + && apk del curl --no-cache + +WORKDIR /root/ + +COPY index.py . +COPY requirements.txt . +RUN pip install -r requirements.txt + +COPY function function + +RUN touch ./function/__init__.py + +WORKDIR /root/function/ +COPY function/requirements.txt . +RUN pip install -r requirements.txt + +WORKDIR /root/ + +ENV fprocess="python index.py" + +HEALTHCHECK --interval=1s CMD [ -e /tmp/.lock ] || exit 1 + +CMD ["fwatchdog"]