aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Rabert <6550543+nvllsvm@users.noreply.github.com>2018-12-10 11:02:54 -0500
committerGitHub <noreply@github.com>2018-12-10 11:02:54 -0500
commit9d00510119889b84de2a1c9fd3900c4ccd96b966 (patch)
tree8d252265a4e5ada92fc6c5e9c9f2f93c19f65caf
parent5b5ee6a8b28f8ae2b7699aaece3f6dbc7466add4 (diff)
parent206bc7911c8d52c4a6c06067927d5ec7010ee833 (diff)
Merge pull request #16 from nvllsvm/docker
Add initial Docker
-rw-r--r--.dockerignore1
-rw-r--r--Dockerfile19
-rwxr-xr-xdebian/rules3
3 files changed, 21 insertions, 2 deletions
diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 000000000..6b8710a71
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1 @@
+.git
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 000000000..66c8884aa
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,19 @@
+ARG DOTNET_VERSION=2
+
+FROM microsoft/dotnet:${DOTNET_VERSION}-sdk as builder
+WORKDIR /repo
+COPY . .
+ARG CONFIGURATION=RELEASE
+RUN dotnet clean \
+ && dotnet build --configuration ${CONFIGURATION} $(pwd)/MediaBrowser.sln \
+ && dotnet publish --configuration ${CONFIGURATION} $(pwd)/MediaBrowser.sln --output /jellyfin
+
+FROM microsoft/dotnet:${DOTNET_VERSION}-runtime
+COPY --from=builder /jellyfin /jellyfin
+RUN apt update \
+ && apt install -y ffmpeg gosu
+EXPOSE 8096
+VOLUME /config /media
+ENV PUID=1000 PGID=1000
+ENTRYPOINT chown $PUID:$PGID /config /media \
+ && gosu $PUID:$PGID dotnet /jellyfin/EmbyServer.dll -programdata /config
diff --git a/debian/rules b/debian/rules
index 3d596ddde..ef697f173 100755
--- a/debian/rules
+++ b/debian/rules
@@ -14,8 +14,7 @@ override_dh_auto_test:
override_dh_clistrip:
override_dh_auto_build:
- git submodule init
- git submodule update
+ git submodule update --init
dotnet build --configuration $(CONFIG) $(CURDIR)/MediaBrowser.sln --output='$(CURDIR)/usr/lib/jellyfin/bin'
dotnet publish --configuration $(CONFIG) $(CURDIR)/MediaBrowser.sln --output='$(CURDIR)/usr/lib/jellyfin/bin'