-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Alex Ellis <[email protected]>
- Loading branch information
Showing
2 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |