From 02ae02e92bc099ccf8bd135edf2495b692e0752f Mon Sep 17 00:00:00 2001 From: kev Date: Sat, 20 Aug 2016 16:00:05 +0800 Subject: [PATCH] add piknik --- README.md | 1 + mpd/README.md | 4 +++ piknik/Dockerfile | 21 +++++++++++++ piknik/README.md | 64 +++++++++++++++++++++++++++++++++++++++ piknik/docker-compose.yml | 7 +++++ piknik/piknik.toml | 0 6 files changed, 97 insertions(+) create mode 100644 piknik/Dockerfile create mode 100644 piknik/README.md create mode 100644 piknik/docker-compose.yml create mode 100644 piknik/piknik.toml diff --git a/README.md b/README.md index aea1f73..6f5c5eb 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,7 @@ A collection of delicious docker recipes. - [x] openhab - [x] openssh - [x] phantomjs +- [x] piknik - [x] portia - [x] pure-ftpd - [x] redis-arm diff --git a/mpd/README.md b/mpd/README.md index d5400f3..235909b 100644 --- a/mpd/README.md +++ b/mpd/README.md @@ -52,6 +52,10 @@ $ docker-compose exec mpd sh >>> mpc repeat on >>> mpc random on >>> mpc +>>> mpc clear +>>> mpc lsplaylists +>>> mpc load shoutcast +>>> mpc play >>> exit ``` diff --git a/piknik/Dockerfile b/piknik/Dockerfile new file mode 100644 index 0000000..e257a34 --- /dev/null +++ b/piknik/Dockerfile @@ -0,0 +1,21 @@ +# +# Dockerfile for piknik +# + +FROM alpine +MAINTAINER kev + +ENV PIKNIK_VERSION 0.9 +ENV PIKNIK_FILE piknik-linux_x86_64-${PIKNIK_VERSION}.tar.gz +ENV PIKNIK_URL https://github.com/jedisct1/piknik/releases/download/${PIKNIK_VERSION}/${PIKNIK_FILE} + +RUN set -xe \ + && apk add --no-cache curl libc6-compat tar \ + && curl -sSL ${PIKNIK_URL} | tar xz -C /usr/local/bin --strip 1 linux-x86_64/piknik \ + && ln -s /lib /lib64 \ + && apk del curl tar + +EXPOSE 8075 + +ENTRYPOINT ["piknik"] +CMD ["-config", "/etc/piknik.toml", "-server"] diff --git a/piknik/README.md b/piknik/README.md new file mode 100644 index 0000000..9aedf70 --- /dev/null +++ b/piknik/README.md @@ -0,0 +1,64 @@ +piknik +====== + +Copy/paste anything over the network. + +## docker-compose.yml + +```yaml +piknik: + image: vimagick/piknik + ports: + - "8075:8075" + volumes: + - ./piknik.toml:/etc/piknik.toml + restart: always +``` + +## Server Setup + +```bash +$ touch piknik.toml +$ docker-compose run --rm piknik -genkeys > piknik.toml +$ vim piknik.toml +$ docker-compose up -d +``` + +> `piknik.toml` contains server/client settings. + +## Client Setup + +```bash +# ~/.bashrc + +# pkc : read the content to copy to the clipboard from STDIN +alias pkc='piknik -copy' + +# pkp : paste the clipboard content +alias pkp='piknik -paste' + +# pkm : move the clipboard content +alias pkm='piknik -move' + +# pkz : delete the clipboard content +alias pkz='piknik -copy < /dev/null' +``` + +```bash +$ vim ~/.piknik.toml + +$ source ~/.bashrc + +$ pkc +hello world +^D + +$ pkp +hello world + +$ pkm +hello world + +$ pkm +The clipboard might be empty +``` diff --git a/piknik/docker-compose.yml b/piknik/docker-compose.yml new file mode 100644 index 0000000..f9826bf --- /dev/null +++ b/piknik/docker-compose.yml @@ -0,0 +1,7 @@ +piknik: + image: vimagick/piknik + ports: + - "8075:8075" + volumes: + - ./piknik.toml:/etc/piknik.toml + restart: always diff --git a/piknik/piknik.toml b/piknik/piknik.toml new file mode 100644 index 0000000..e69de29