From 3745c6710ddd1d5504ea4882d07d97e2ce55d499 Mon Sep 17 00:00:00 2001 From: Ruediger Küpper Date: Tue, 12 May 2020 17:31:10 +0200 Subject: add docker stuff --- Dockerfile | 9 +++++++++ README.md | 22 ++++++++++++++++++++++ docker-compose.yml | 13 +++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cd221bd --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM golang:alpine + +RUN mkdir /app +WORKDIR /app +COPY dist/feed2imap-go_linux_amd64/feed2imap-go /app/feed2imap-go +COPY config.yml /app/config.yml + +ENTRYPOINT ["/app/feed2imap-go", "-c", "/app/data/feed.cache", "-f", "/app/config.yml" ] + diff --git a/README.md b/README.md index 47c9984..bb36e09 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,28 @@ Note that this is not recommended, because it is a) not obvious which version yo and b) the update process is not clear, especially regarding the dependencies. +### Run in docker + +Build docker image: + +````bash +docker build -t feed2imap-go . +```` + +Run docker-command: + +````bash +docker volume create docker_feeddata +docker container run -v feeddata:/app/data feed2imap-go +```` + +Or run with docker-compose: + +````bash +docker-compose up + +Next Todo: Run scheduled kubernetes job in k8s cluster + [i6]: https://github.com/Necoro/feed2imap-go/issues/6 [i4]: https://github.com/Necoro/feed2imap-go/issues/4 [i9]: https://github.com/Necoro/feed2imap-go/issues/9 diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..d27aa2a --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,13 @@ +version: "2" + +services: + + feed2imap: + image: "feed2imap-go" + volumes: + - "feeddata:/app/data" + +volumes: + feeddata: + + -- cgit v1.2.3-54-g00ecf