From b98915f84cd4d6ddfd44a772441f48807c00bebb Mon Sep 17 00:00:00 2001 From: chigusa Date: Wed, 8 Aug 2018 22:47:36 +0800 Subject: [PATCH] add docker Signed-off-by: chigusa --- Dockerfile | 13 ++++++++----- Makefile | 2 +- README.md | 17 ++++++++++++----- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0d82060..f336b93 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,21 +3,24 @@ FROM alpine MAINTAINER chigusa -ENV OUTPUT_DIR /srv/bililive -ENV CONF_DIR /etc/bililive-go -ENV PORT 8080 +ENV OUTPUT_DIR="/srv/bililive" \ + CONF_DIR="/etc/bililive-go" \ + PORT=8080 EXPOSE $PORT RUN mkdir -p $OUTPUT_DIR && \ mkdir -p $CONF_DIR && \ + sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories && \ apk update && \ apk upgrade && \ - apk --no-cache add ffmpeg + apk --no-cache add ffmpeg libc6-compat curl bash tree tzdata && \ + cp -r -f /usr/share/zoneinfo/Asia/Shanghai /etc/localtime VOLUME $OUTPUT_DIR ADD ./bin/bililive-go-linux-amd64 /usr/bin/bililive-go ADD ./config.docker.yml $CONF_DIR/config.yml -ENTRYPOINT /usr/bin/bililive-go -c $CONF_DIR/config.yml \ No newline at end of file +ENTRYPOINT ["/usr/bin/bililive-go"] +CMD ["-c", "/etc/bililive-go/config.yml"] \ No newline at end of file diff --git a/Makefile b/Makefile index d3a116a..b37d635 100644 --- a/Makefile +++ b/Makefile @@ -68,7 +68,7 @@ release-windows-amd64: mkdir .PHONY: release-docker release-docker: release-linux-amd64 - docker build -t 'bililive-go:${VERSION}' . + docker build -t 'chigusa/bililive-go' . .PHONY: test test: diff --git a/README.md b/README.md index 86d54e4..18028ac 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,24 @@ # Bililive-go [![Build Status](https://travis-ci.org/hr3lxphr6j/bililive-go.svg?branch=master)](https://travis-ci.org/hr3lxphr6j/bililive-go) [![Go Report Card](https://goreportcard.com/badge/github.com/hr3lxphr6j/bililive-go)](https://goreportcard.com/report/github.com/hr3lxphr6j/bililive-go) +[![Github release](https://img.shields.io/github/release/hr3lxphr6j/bililive-go.svg)](https://github.com/hr3lxphr6j/bililive-go/releases/latest) +[![Docker Pulls](https://img.shields.io/docker/pulls/chigusa/bililive-go.svg)](https://hub.docker.com/r/chigusa/bililive-go/) +[![Bilibili](https://img.shields.io/badge/%E5%93%94%E5%93%A9%E5%93%94%E5%93%A9-%E6%9C%AA%E6%9D%A5%E7%A7%91%E6%8A%80%E7%8E%8B%E8%80%81%E8%8F%8A%E5%BD%95%E6%92%AD%E7%BB%84-ebb8d0.svg)](https://space.bilibili.com/18578203/) -Bililive-go是一个跨平台、多直播间录制工具 -By:[未来科技王老菊录播组](https://space.bilibili.com/18578203/) +Bililive-go是一个跨平台、多直播间录制工具 ![image](https://github.com/hr3lxphr6j/bililive-go/raw/master/docs/screenshot.png) ## 例子 -``` -./bililive-go -i https://www.panda.tv/10300 -i https://www.douyu.com/6655 -``` +- 本地 + ``` + ./bililive-go -i https://www.panda.tv/10300 -i https://www.douyu.com/6655 + ``` +- docker + ``` + docker run -v ~/Movies:/srv/bililive --rm chigusa/bililive-go -o /srv/bililive -i https://www.panda.tv/10300 + ``` ## 支持网站