From 4e75d39a67d403c133ea2dc51bb3fb5a68e4f896 Mon Sep 17 00:00:00 2001 From: Luckydonald Date: Mon, 9 Jan 2017 16:30:51 +0100 Subject: [PATCH 1/2] Create Dockerfile --- Dockerfile | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..276e350 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM openjdk:8 + +ENV JAR_VERSION 1.0.5-test.5 +ENV JAR_DOWNLOAD_URL https://github.com/fabianonline/telegram_backup/releases/download/${JAR_VERSION}/telegram_backup.jar + +RUN apt-get update -y && apt-get install -y curl && \ + curl -L "https://github.com/Yelp/dumb-init/releases/download/v1.1.3/dumb-init_1.1.3_amd64" -o /bin/dumb-init && \ + curl -L $JAR_DOWNLOAD_URL -o telegram_backup.jar && mkdir /data/ && chmod +x /bin/dumb-init + +ENTRYPOINT ["/bin/dumb-init", "--"] + +CMD ["java", "-jar", "telegram_backup.jar", "--target", "/data/", "--help"] From 2ac8c753bb16bf72d48bb5525f19dbf3800e2d9f Mon Sep 17 00:00:00 2001 From: Luckydonald Date: Mon, 9 Jan 2017 16:32:46 +0100 Subject: [PATCH 2/2] Create docker-compose.yml --- docker-compose.yml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..ee916a9 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,9 @@ +version: '2' +services: + tg-dl: + build: + context: . + restart: "unless-stopped" + volumes: + - /data/telegram-downloader:/data # host server path : docker container path + command: ["java", "-jar", "telegram_backup.jar", "--target", "/data/"]