File tree Expand file tree Collapse file tree 2 files changed +58
-0
lines changed Expand file tree Collapse file tree 2 files changed +58
-0
lines changed Original file line number Diff line number Diff line change 1+ FROM arm32v6/alpine:3.6
2+
3+ RUN apk add --no-cache nodejs nodejs-npm ca-certificates
4+ RUN apk --no-cache add curl \
5+ && echo "Pulling watchdog binary from Github." \
6+ && curl -sSL https://github.com/alexellis/faas/releases/download/0.6.0/fwatchdog-armhf > /usr/bin/fwatchdog \
7+ && chmod +x /usr/bin/fwatchdog \
8+ && apk del curl --no-cache
9+
10+ WORKDIR /root/
11+
12+ COPY package.json .
13+
14+ RUN npm i
15+ COPY index.js .
16+ COPY function function
17+ WORKDIR /root/function
18+
19+ ENV NPM_CONFIG_LOGLEVEL warn
20+ RUN npm i || :
21+ WORKDIR /root/
22+
23+ ENV cgi_headers="true"
24+
25+ ENV fprocess="node index.js"
26+
27+ HEALTHCHECK --interval=1s CMD [ -e /tmp/.lock ] || exit 1
28+
29+ CMD ["fwatchdog" ]
Original file line number Diff line number Diff line change 1+ FROM armhf/python:2.7-alpine
2+ # Alternatively use ADD https:// (which will not be cached by Docker builder)
3+ RUN apk --no-cache add curl \
4+ && echo "Pulling watchdog binary from Github." \
5+ && curl -sSL https://github.com/alexellis/faas/releases/download/0.6.0/fwatchdog-armhf > /usr/bin/fwatchdog \
6+ && chmod +x /usr/bin/fwatchdog \
7+ && apk del curl --no-cache
8+
9+ WORKDIR /root/
10+
11+ COPY index.py .
12+ COPY requirements.txt .
13+ RUN pip install -r requirements.txt
14+
15+ COPY function function
16+
17+ RUN touch ./function/__init__.py
18+
19+ WORKDIR /root/function/
20+ COPY function/requirements.txt .
21+ RUN pip install -r requirements.txt
22+
23+ WORKDIR /root/
24+
25+ ENV fprocess="python index.py"
26+
27+ HEALTHCHECK --interval=1s CMD [ -e /tmp/.lock ] || exit 1
28+
29+ CMD ["fwatchdog" ]
You can’t perform that action at this time.
0 commit comments