From a066bc8b9e512506edd18780864e199525ffefd3 Mon Sep 17 00:00:00 2001 From: Jordan Cohen Date: Tue, 27 Feb 2018 11:24:35 -0500 Subject: [PATCH] docker implementation --- README.md | 14 ++++++++++++++ docker/Dockerfile | 7 +++++++ docker/ep.sh | 2 ++ 3 files changed, 23 insertions(+) create mode 100644 docker/Dockerfile create mode 100755 docker/ep.sh diff --git a/README.md b/README.md index 02c1760..f0b41a3 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,20 @@ or - [parrotsay-api](https://github.com/matheuss/parrotsay-api) - API for this module - [Cult of the Party Parrot](http://cultofthepartyparrot.com/) +## Docker + +check your parrot fortune + +`docker run -t hypergig/parrotsay` + +to parrotsay + +`docker run -t hypergig/parrotsay yay` + +to build + +`docker build -t parrotsay docker/.` + ## License MIT © [Matheus Fernandes](http://matheus.top) diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..2a3c4e3 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,7 @@ +FROM node:9.6-alpine +MAINTAINER hypergig@gmail.com +RUN apk add --no-cache fortune && \ + npm install --global parrotsay && \ + fortune | parrotsay +COPY ep.sh . +ENTRYPOINT ["/ep.sh"] diff --git a/docker/ep.sh b/docker/ep.sh new file mode 100755 index 0000000..fee58df --- /dev/null +++ b/docker/ep.sh @@ -0,0 +1,2 @@ +#! /bin/sh +{ [ -z "$*" ] && fortune || echo "$*"; } | parrotsay