Skip to content

Commit

Permalink
Updated to multidocker files to get watchdog
Browse files Browse the repository at this point in the history
Signed-off-by: Krystian Wojcicki <[email protected]>
  • Loading branch information
kwojcicki authored and alexellis committed Aug 3, 2019
1 parent 2887f3f commit f81d056
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 36 deletions.
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ $ faas template pull https://github.com/owner/repo

Multiple templates can be stored within a single Git repository. View [the CLI reference guide](https://github.com/openfaas/faas-cli) for how to build a template.

## Modifying templates

```./verify.sh``` can be utilized to verify your changes to templates in this repo.

## Guidelines apply from main OpenFaaS repo

See guide for [FaaS](https://github.com/openfaas/faas/blob/master/CONTRIBUTING.md) here.
Expand Down
2 changes: 0 additions & 2 deletions template/java8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ FROM openfaas/of-watchdog:0.5.4 as watchdog

FROM openjdk:8u212-jdk-alpine as ship

ARG WATCHDOG_VERSION=0.5.1

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

Expand Down
12 changes: 4 additions & 8 deletions template/node-arm64/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
FROM openfaas/classic-watchdog:0.15.4 as watchdog

FROM arm64v8/node:8.9.1

RUN apt-get update -qy \
&& apt-get install -qy curl ca-certificates --no-install-recommends \
&& echo "Pulling watchdog binary from Github." \
&& curl -sSL https://github.com/openfaas/faas/releases/download/0.13.0/fwatchdog-arm64 > /usr/bin/fwatchdog \
&& chmod +x /usr/bin/fwatchdog \
&& apt-get -qy remove curl \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog
RUN chmod +x /usr/bin/fwatchdog

WORKDIR /root/

Expand Down
10 changes: 5 additions & 5 deletions template/node-armhf/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM openfaas/classic-watchdog:0.15.4 as watchdog

FROM arm32v6/alpine:3.6

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

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/openfaas/faas/releases/download/0.13.0/fwatchdog-armhf > /usr/bin/fwatchdog \
&& chmod +x /usr/bin/fwatchdog \
&& apk del curl --no-cache

WORKDIR /root/

Expand Down
10 changes: 5 additions & 5 deletions template/node/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM openfaas/classic-watchdog:0.15.4 as watchdog

FROM node:8.9.1-alpine

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

RUN addgroup -S app && adduser app -S -G app
RUN apk --no-cache add curl \
&& echo "Pulling watchdog binary from Github." \
&& curl -sSL https://github.com/openfaas/faas/releases/download/0.13.0/fwatchdog > /usr/bin/fwatchdog \
&& chmod +x /usr/bin/fwatchdog \
&& apk del curl --no-cache

WORKDIR /root/

Expand Down
11 changes: 6 additions & 5 deletions template/python-armhf/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
FROM openfaas/classic-watchdog:0.15.4 as watchdog

FROM python:2.7-alpine

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

# Allows you to add additional packages via build-arg
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 -sSL https://github.com/openfaas/faas/releases/download/0.13.0/fwatchdog-armhf > /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
11 changes: 5 additions & 6 deletions template/python3-armhf/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
FROM openfaas/classic-watchdog:0.15.4 as watchdog

FROM python:3-alpine

# Allows you to add additional packages via build-arg
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 -sSL https://github.com/openfaas/faas/releases/download/0.13.0/fwatchdog-armhf > /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 ${ADDITIONAL_PACKAGE}

# Add non root user
RUN addgroup -S app && adduser app -S -G app
Expand Down
11 changes: 6 additions & 5 deletions template/ruby/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
FROM openfaas/classic-watchdog:0.15.4 as watchdog

FROM ruby:2.5.1-alpine3.7

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 -sSL https://github.com/openfaas/faas/releases/download/0.13.0/fwatchdog > /usr/bin/fwatchdog \
&& chmod +x /usr/bin/fwatchdog \
&& apk del curl --no-cache
RUN apk --no-cache add ${ADDITIONAL_PACKAGE}

WORKDIR /home/app

Expand Down

0 comments on commit f81d056

Please sign in to comment.