Skip to content

Commit f016955

Browse files
committed
Switch to multi-arch image to pull images
Signed-off-by: Alex Ellis <[email protected]>
1 parent 77ee581 commit f016955

File tree

3 files changed

+17
-18
lines changed

3 files changed

+17
-18
lines changed

template/python27-flask/Dockerfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
FROM openfaas/of-watchdog:0.5.3 as watchdog
12
FROM python:2.7-alpine
23

4+
COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog
5+
RUN chmod +x /usr/bin/fwatchdog
6+
7+
ARG ADDITIONAL_PACKAGE
38
# Alternatively use ADD https:// (which will not be cached by Docker builder)
4-
RUN apk --no-cache add curl \
5-
&& echo "Pulling watchdog binary from Github." \
6-
&& curl -sSLf https://github.com/openfaas-incubator/of-watchdog/releases/download/0.5.0/of-watchdog > /usr/bin/fwatchdog \
7-
&& chmod +x /usr/bin/fwatchdog \
8-
&& apk del curl --no-cache
9+
RUN apk --no-cache add ${ADDITIONAL_PACKAGE}
910

1011
WORKDIR /root/
1112

template/python3-flask/Dockerfile

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1+
FROM openfaas/of-watchdog:0.5.3 as watchdog
12
FROM python:3.7-alpine
23

3-
# Alternatively use ADD https:// (which will not be cached by Docker builder)
4-
RUN apk --no-cache add curl \
5-
&& echo "Pulling watchdog binary from Github." \
6-
&& curl -sSLf https://github.com/openfaas-incubator/of-watchdog/releases/download/0.5.0/of-watchdog > /usr/bin/fwatchdog \
7-
&& chmod +x /usr/bin/fwatchdog \
8-
&& apk del curl --no-cache
4+
COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog
5+
RUN chmod +x /usr/bin/fwatchdog
96

10-
RUN apk --no-cache add musl-dev gcc make
7+
ARG ADDITIONAL_PACKAGE
8+
RUN apk --no-cache add musl-dev gcc make ${ADDITIONAL_PACKAGE}
119

1210
WORKDIR /root/
1311

template/python3-http/Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
FROM python:3.6-alpine
1+
FROM openfaas/of-watchdog:0.5.3 as watchdog
2+
FROM python:3.7-alpine
3+
4+
COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog
5+
RUN chmod +x /usr/bin/fwatchdog
26

37
ARG ADDITIONAL_PACKAGE
48
# Alternatively use ADD https:// (which will not be cached by Docker builder)
5-
RUN apk --no-cache add curl ${ADDITIONAL_PACKAGE} \
6-
&& echo "Pulling watchdog binary from Github." \
7-
&& curl -sSLf https://github.com/openfaas-incubator/of-watchdog/releases/download/0.4.6/of-watchdog > /usr/bin/fwatchdog \
8-
&& chmod +x /usr/bin/fwatchdog \
9-
&& apk del curl --no-cache
9+
RUN apk --no-cache add ${ADDITIONAL_PACKAGE}
1010

1111
# Add non root user
1212
RUN addgroup -S app && adduser app -S -G app

0 commit comments

Comments
 (0)