Skip to content

Commit

Permalink
Switch to multi-arch image to pull images
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
  • Loading branch information
alexellis committed Jun 6, 2019
1 parent 77ee581 commit f016955
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 18 deletions.
11 changes: 6 additions & 5 deletions template/python27-flask/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
FROM openfaas/of-watchdog:0.5.3 as watchdog
FROM python:2.7-alpine

COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog
RUN chmod +x /usr/bin/fwatchdog

ARG ADDITIONAL_PACKAGE
# 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 -sSLf https://github.com/openfaas-incubator/of-watchdog/releases/download/0.5.0/of-watchdog > /usr/bin/fwatchdog \
&& chmod +x /usr/bin/fwatchdog \
&& apk del curl --no-cache
RUN apk --no-cache add ${ADDITIONAL_PACKAGE}

WORKDIR /root/

Expand Down
12 changes: 5 additions & 7 deletions template/python3-flask/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
FROM openfaas/of-watchdog:0.5.3 as watchdog
FROM python:3.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 -sSLf https://github.com/openfaas-incubator/of-watchdog/releases/download/0.5.0/of-watchdog > /usr/bin/fwatchdog \
&& chmod +x /usr/bin/fwatchdog \
&& apk del curl --no-cache
COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog
RUN chmod +x /usr/bin/fwatchdog

RUN apk --no-cache add musl-dev gcc make
ARG ADDITIONAL_PACKAGE
RUN apk --no-cache add musl-dev gcc make ${ADDITIONAL_PACKAGE}

WORKDIR /root/

Expand Down
12 changes: 6 additions & 6 deletions template/python3-http/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM python:3.6-alpine
FROM openfaas/of-watchdog:0.5.3 as watchdog
FROM python:3.7-alpine

COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog
RUN chmod +x /usr/bin/fwatchdog

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

# Add non root user
RUN addgroup -S app && adduser app -S -G app
Expand Down

0 comments on commit f016955

Please sign in to comment.