Skip to content

Commit

Permalink
Add ARM dockerfiles
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
  • Loading branch information
alexellis committed Aug 16, 2017
1 parent 738d784 commit 0b2e05d
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
29 changes: 29 additions & 0 deletions template/node-armhf/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
29 changes: 29 additions & 0 deletions template/python-armhf/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]

0 comments on commit 0b2e05d

Please sign in to comment.