Skip to content

Commit

Permalink
fixes #3 - added multiarch + crossbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
jaymoulin committed Nov 23, 2017
1 parent 2a52624 commit 24ea89c
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 24 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.Dockerfile
*.yaml
qemu-*-static
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM debian:stable-slim as builder

COPY qemu-*-static /usr/bin/

FROM builder

LABEL maintainer="Jay MOULIN <[email protected]> <https://twitter.com/MoulinJay>"

RUN apt-get update && apt-get install libav-tools -y --force-yes

ADD ./convert.sh /usr/bin/convert.sh

VOLUME /media

CMD ["convert.sh"]
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
VERSION ?= 0.2.0
FULLVERSION ?= ${VERSION}
archs = amd64 arm32v5 arm32v7 arm64v8 i386

.PHONY: all build publish latest
all: build publish latest
build:
cp /usr/bin/qemu-*-static .
$(foreach arch,$(archs), \
cat Dockerfile | sed "s/FROM debian:stable-slim/FROM ${arch}\/debian:stable-slim/g" > .Dockerfile; \
docker build -t jaymoulin/rpi-plex-video-converter:${VERSION}-$(arch) -f .Dockerfile .;\
)
publish:
docker push jaymoulin/rpi-plex-video-converter
cat manifest.yml | sed "s/\$$VERSION/${VERSION}/g" > manifest.yaml
cat manifest.yaml | sed "s/\$$FULLVERSION/${FULLVERSION}/g" > manifest2.yaml
mv manifest2.yaml manifest.yaml
manifest-tool push from-spec manifest.yaml
latest: build
FULLVERSION=latest VERSION=${VERSION} make publish
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Raspberry PI - Plex Video converter - Docker Image
[![Bitcoin donation](https://github.com/jaymoulin/jaymoulin.github.io/raw/master/btc.png "Bitcoin donation")](https://m.freewallet.org/id/374ad82e/btc)
[![Litecoin donation](https://github.com/jaymoulin/jaymoulin.github.io/raw/master/ltc.png "Litecoin donation")](https://m.freewallet.org/id/374ad82e/ltc)
[![PayPal donation](https://github.com/jaymoulin/jaymoulin.github.io/raw/master/ppl.png "PayPal donation")](https://www.paypal.me/jaymoulin)
[![Beerpay donation](https://beerpay.io/jaymoulin/docker-rpi-plex-video-converter/badge.svg "Beerpay donation")](https://beerpay.io/jaymoulin/docker-rpi-plex-video-converter)

This image purpose is to convert unsupported video files by Plex for Raspberry to mp4 which is supported.

Expand All @@ -25,7 +24,7 @@ docker run --rm -t -v /path/to/your/media/folder:/media jaymoulin/rpi-plex-video
Appendixes
---

### Install RaspberryPi Docker
### Install Docker

If you don't have Docker installed yet, you can do it easily in one line using this command

Expand Down
30 changes: 30 additions & 0 deletions manifest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
image: jaymoulin/rpi-plex-video-converter:$FULLVERSION
manifests:
-
image: jaymoulin/rpi-plex-video-converter:$VERSION-arm32v5
platform:
architecture: arm
variant: v5
os: linux
-
image: jaymoulin/rpi-plex-video-converter:$VERSION-arm32v7
platform:
architecture: arm
variant: v7
os: linux
-
image: jaymoulin/rpi-plex-video-converter:$VERSION-arm64v8
platform:
architecture: arm
variant: v8
os: linux
-
image: jaymoulin/rpi-plex-video-converter:$VERSION-amd64
platform:
architecture: arm64
os: linux
-
image: jaymoulin/rpi-plex-video-converter:$VERSION-i386
platform:
architecture: 386
os: linux
11 changes: 0 additions & 11 deletions pc/Dockerfile

This file was deleted.

11 changes: 0 additions & 11 deletions rpi/Dockerfile

This file was deleted.

0 comments on commit 24ea89c

Please sign in to comment.