diff --git a/sample-functions/AlpineFunction/Dockerfile b/sample-functions/AlpineFunction/Dockerfile index 096d8ced..9055091f 100644 --- a/sample-functions/AlpineFunction/Dockerfile +++ b/sample-functions/AlpineFunction/Dockerfile @@ -1,6 +1,7 @@ -FROM alpine:3.6 +FROM alpine:3.7 ADD https://github.com/openfaas/faas/releases/download/0.7.9/fwatchdog /usr/bin + # COPY ./fwatchdog /usr/bin/ RUN chmod +x /usr/bin/fwatchdog diff --git a/sample-functions/AlpineFunction/Dockerfile.armhf b/sample-functions/AlpineFunction/Dockerfile.armhf index cb5068b0..1b317dd2 100644 --- a/sample-functions/AlpineFunction/Dockerfile.armhf +++ b/sample-functions/AlpineFunction/Dockerfile.armhf @@ -1,4 +1,4 @@ -FROM alpine:3.6 +FROM alpine:3.7 ADD https://github.com/openfaas/faas/releases/download/0.7.9/fwatchdog-armhf /usr/bin/fwatchdog RUN chmod +x /usr/bin/fwatchdog diff --git a/sample-functions/pwgen/Dockerfile b/sample-functions/pwgen/Dockerfile new file mode 100644 index 00000000..e56dd987 --- /dev/null +++ b/sample-functions/pwgen/Dockerfile @@ -0,0 +1,5 @@ +FROM functions/alpine:latest + +RUN apk add --no-cache pwgen + +ENV fprocess="xargs pwgen -s" diff --git a/sample-functions/pwgen/README.md b/sample-functions/pwgen/README.md new file mode 100644 index 00000000..bb3a2323 --- /dev/null +++ b/sample-functions/pwgen/README.md @@ -0,0 +1,10 @@ +pwgen +----- + +The password generation utility from Alpine Linux, but as a function. + +Man page: + +https://linux.die.net/man/1/pwgen + + diff --git a/sample-functions/stack.yml b/sample-functions/stack.yml index 973a6188..a7ae689a 100644 --- a/sample-functions/stack.yml +++ b/sample-functions/stack.yml @@ -10,6 +10,11 @@ functions: environment: fprocess: "cat" + pwgen: + lang: dockerfile + handler: ./pwgen + image: functions/pwgen-sample:latest + apikey-secret: lang: go handler: ./apikey-secret