Skip to content
Snippets Groups Projects
Commit ea49d5e5 authored by Alex Ellis's avatar Alex Ellis Committed by GitHub
Browse files

Merge pull request #124 from rgee0/updateSamples3

New armhf and updated sample function Dockerfiles
parents 5f8d31fe 1cd7ce24
No related branches found
No related tags found
No related merge requests found
Showing
with 55 additions and 80 deletions
FROM armhf/alpine:3.5
FROM arm32v6/alpine:3.6
ADD https://github.com/alexellis/faas/releases/download/v0.3-alpha/fwatchdog-armhf /usr/bin/fwatchdog
ADD https://github.com/alexellis/faas/releases/download/0.6.0/fwatchdog-armhf /usr/bin/fwatchdog
RUN chmod +x /usr/bin/fwatchdog
# Populate example here
# ENV fprocess="wc -l"
HEALTHCHECK --interval=5s CMD [ -e /tmp/.lock ] || exit 1
CMD ["fwatchdog"]
FROM alpine:latest
RUN apk --update add nodejs
RUN apk --update add nodejs nodejs-npm
ADD https://github.com/alexellis/faas/releases/download/v0.5-alpha/fwatchdog /usr/bin
RUN chmod +x /usr/bin/fwatchdog
......
FROM alpine:latest
RUN apk --update add nodejs
RUN apk --update add nodejs nodejs-npm
ADD https://github.com/alexellis/faas/releases/download/v0.5-alpha/fwatchdog /usr/bin
#COPY ./fwatchdog /usr/bin/
......
FROM alpine:latest
RUN apk --update add nodejs
RUN apk --update add nodejs nodejs-npm
ADD https://github.com/alexellis/faas/releases/download/v0.5-alpha/fwatchdog /usr/bin
RUN chmod +x /usr/bin/fwatchdog
......
FROM armhf/alpine:3.5
FROM arm32v6/alpine:3.6
ADD https://github.com/alexellis/faas/releases/download/0.5.4-alpha/fwatchdog-armhf /usr/bin/fwatchdog
ADD https://github.com/alexellis/faas/releases/download/0.6.0/fwatchdog-armhf /usr/bin/fwatchdog
RUN chmod +x /usr/bin/fwatchdog
WORKDIR /root/
......
FROM node:6.9.1-alpine
ADD https://github.com/alexellis/faas/releases/download/0.5.1-alpha/fwatchdog /usr/bin
RUN chmod +x /usr/bin/fwatchdog
WORKDIR /root/
COPY package.json .
# Provides a boot-strap into your function, just add handler.js to derived image
RUN npm i
COPY faas_index.js .
ENV fprocess="node faas_index.js"
HEALTHCHECK --interval=5s CMD [ -e /tmp/.lock ] || exit 1
CMD ["fwatchdog"]
#!/bin/sh
echo "Building functions/nodebase:alpine-6.9.1"
docker build -t functions/nodebase:alpine-6.9.1 .
"use strict"
let getStdin = require('get-stdin');
let handler = require('./handler');
getStdin().then(val => {
let req;
if(process.env.json) {
req = JSON.parse(val);
} else {
req = val
}
handler(req, (err, res) => {
if(err) {
return console.error(err);
}
if(process.env.json) {
console.log(JSON.stringify(res));
} else {
console.log(res);
}
});
}).catch(e => {
console.error(e.stack);
});
{
"name": "NodejsBase",
"version": "1.0.0",
"description": "",
"main": "faas_index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"get-stdin": "^5.0.1"
}
}
FROM alpine:latest
RUN apk --update add nodejs
RUN apk --update add nodejs nodejs-npm
ADD https://github.com/alexellis/faas/releases/download/0.6.0/fwatchdog /usr/bin
RUN chmod +x /usr/bin/fwatchdog
......
FROM armhf/alpine:latest
RUN apk --no-cache add nodejs
FROM arm32v6/alpine:latest
RUN apk --no-cache add nodejs nodejs-npm
COPY fwatchdog-armhf /usr/bin/fwatchdog
ADD https://github.com/alexellis/faas/releases/download/0.6.0/fwatchdog-armhf /usr/bin/fwatchdog
RUN chmod +x /usr/bin/fwatchdog
COPY package.json .
COPY main.js .
RUN npm i
ENV fprocess="node main.js"
HEALTHCHECK --interval=5s CMD [ -e /tmp/.lock ] || exit 1
CMD ["fwatchdog"]
FROM arm32v6/alpine:3.6
RUN apk --no-cache add imagemagick
ADD https://github.com/alexellis/faas/releases/download/0.6.0/fwatchdog-armhf /usr/bin/fwatchdog
RUN chmod +x /usr/bin/fwatchdog
ENV fprocess "convert - -resize 50% fd:1"
EXPOSE 8080
HEALTHCHECK --interval=1s CMD [ -e /tmp/.lock ] || exit 1
CMD [ "/usr/bin/fwatchdog"]
#!/bin/sh
echo "Building functions/resizer:armhf..."
docker build -t functions/resizer:armhf -f Dockerfile.armhf .
FROM python:2.7-alpine
RUN pip install textblob
RUN python -m textblob.download_corpora
RUN pip install textblob && \
python -m textblob.download_corpora
ADD https://github.com/alexellis/faas/releases/download/0.5.1-alpha/fwatchdog /usr/bin
RUN chmod +x /usr/bin/fwatchdog
......
FROM arm32v7/python:2.7-slim
RUN pip install textblob && \
python -m textblob.download_corpora
ADD https://github.com/alexellis/faas/releases/download/0.6.0/fwatchdog-armhf /usr/bin/fwatchdog
RUN chmod +x /usr/bin/fwatchdog
WORKDIR /root/
COPY handler.py .
ENV fprocess="python handler.py"
HEALTHCHECK --interval=1s CMD [ -e /tmp/.lock ] || exit 1
CMD ["fwatchdog"]
#!/bin/sh
echo "Building functions/sentimentanalysis:armhf..."
docker build -t functions/sentimentanalysis:armhf . -f Dockerfile.armhf
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment