From e15e43e8853d2d462d43dd4aabeb4990e1bc9a8f Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Sun, 28 Aug 2016 15:04:05 +0200 Subject: [PATCH] Add Dockerfile and instructions; --- Dockerfile | 18 ++++++++++++++++++ README.md | 8 ++++++++ run-docker.sh | 8 ++++++++ 3 files changed, 34 insertions(+) create mode 100644 Dockerfile create mode 100755 run-docker.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f81214d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM node:4 + +RUN apt update && \ + apt dist-upgrade -y; + +RUN apt install -y git; + +RUN mkdir -p /opt/gitlab-to-irc + +WORKDIR /opt +RUN git clone https://framagit.org/bnjbvr/gitlab-to-irc + +WORKDIR /opt/gitlab-to-irc +COPY ./config.js /opt/gitlab-to-irc/config.js + +RUN npm install + +CMD node ./index.js diff --git a/README.md b/README.md index d0c5d4f..15c3588 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,14 @@ how-to - run `node ./index.js` from anywhere. - fun and profit. +how-to (Docker) +=== + +- Rename `config.example.js` to `config.js` and change the values there. +- Modify the port mapping in `docker-run.sh`. +- `./run-docker.sh` +- fun and profit. + but this doesn't implement what i want === diff --git a/run-docker.sh b/run-docker.sh new file mode 100755 index 0000000..4757db1 --- /dev/null +++ b/run-docker.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +docker build -t bnjbvr/gitlab-to-irc . + +docker run --name gitlab-to-irc \ + -p 1337:1337 \ + -d -ti bnjbvr/gitlab-to-irc +