Skip to content

Commit

Permalink
fixes #7 - added multiarch + crossbuilding
Browse files Browse the repository at this point in the history
  • Loading branch information
jaymoulin committed Nov 23, 2017
1 parent 6967f16 commit 116d69f
Show file tree
Hide file tree
Showing 7 changed files with 88 additions and 15 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
qemu-*-static
*.yaml
.Dockerfile
24 changes: 24 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
How to Contribute
=================

This project welcomes your contribution. There are several ways to help out:

* Create an [issue](https://github.com/jaymoulin/jdownloader/issues/) on GitHub,
if you have found a bug or have an idea for a feature
* Write test cases for open bug issues
* Write patches for open bug/feature issues

Issues
------

* Submit an [issue](https://github.com/jaymoulin/jdownloader/issues/)
* Make sure it does not already exist.
* Clearly describe the issue including steps to reproduce, when it is a bug.
* Make sure you note the version you use.

Additional Resources
--------------------

* [Existing issues](https://github.com/jaymoulin/jdownloader/issues/)
* [General GitHub documentation](https://help.github.com/)
* [GitHub pull request documentation](https://help.github.com/send-pull-requests/)
17 changes: 10 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
FROM larmog/armhf-alpine-java:jdk-8u73
FROM openjdk:jre-alpine as builder

MAINTAINER Jay MOULIN <[email protected]>
COPY qemu-*-static /usr/bin/

FROM builder

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

# archive extraction uses sevenzipjbinding library
# which is compiled against libstdc++
RUN mkdir /opt/JDownloader/
RUN mkdir -p /opt/JDownloader/
RUN apk add --update libstdc++ ffmpeg && apk add wget --virtual .build-deps && \
wget -O /opt/JDownloader/JDownloader.jar "http://installer.jdownloader.org/JDownloader.jar?$RANDOM" && chmod +x /opt/JDownloader/JDownloader.jar && \
wget -O /sbin/tini "https://github.com/krallin/tini/releases/download/v0.16.1/tini-static-armhf" --no-check-certificate && chmod +x /sbin/tini && \
apk del wget --purge .build-deps
wget -O /opt/JDownloader/JDownloader.jar "http://installer.jdownloader.org/JDownloader.jar?$RANDOM" && chmod +x /opt/JDownloader/JDownloader.jar && \
wget -O /sbin/tini "https://github.com/krallin/tini/releases/download/v0.16.1/tini-static-armhf" --no-check-certificate && chmod +x /sbin/tini && \
apk del wget --purge .build-deps
ENV LD_LIBRARY_PATH=/lib;/lib32;/usr/lib


ADD daemon.sh /opt/JDownloader/
ADD default-config.json.dist /opt/JDownloader/org.jdownloader.api.myjdownloader.MyJDownloaderSettings.json.dist
ADD configure.sh /usr/bin/configure
Expand Down
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
VERSION ?= 0.4.0
FULLVERSION ?= ${VERSION}
archs = amd64 arm32v6 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 openjdk:jre-alpine/FROM ${arch}\/openjdk:jre-alpine/g" > .Dockerfile; \
docker build -t jaymoulin/jdownloader:${VERSION}-$(arch) -f .Dockerfile .;\
)
publish:
docker push jaymoulin/jdownloader
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
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
![logo](logo.png "logo")

Raspberry PI - JDownloader - Docker Image
=========================================
JDownloader - Docker Image
==========================

[![latest release](https://img.shields.io/github/release/jaymoulin/docker-rpi-jdownloader.svg "latest release")](http://github.com/jaymoulin/docker-rpi-jdownloader/releases)
[![Docker Pulls](https://img.shields.io/docker/pulls/jaymoulin/rpi-jdownloader.svg)](https://hub.docker.com/r/jaymoulin/rpi-jdownloader/)
[![Docker stars](https://img.shields.io/docker/stars/jaymoulin/rpi-jdownloader.svg)](https://hub.docker.com/r/jaymoulin/rpi-jdownloader/)
[![latest release](https://img.shields.io/github/release/jaymoulin/docker-jdownloader.svg "latest release")](http://github.com/jaymoulin/docker-jdownloader/releases)
[![Docker Pulls](https://img.shields.io/docker/pulls/jaymoulin/jdownloader.svg)](https://hub.docker.com/r/jaymoulin/jdownloader/)
[![Docker stars](https://img.shields.io/docker/stars/jaymoulin/jdownloader.svg)](https://hub.docker.com/r/jaymoulin/jdownloader/)
[![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-jdownloader/badge.svg "Beerpay donation")](https://beerpay.io/jaymoulin/docker-rpi-jdownloader)

This image allows you to have JDownloader daemon installed easily thanks to Docker.

Installation
---

```
docker run -d --restart=always -v ~/Downloads:/root/Downloads -v ~/jdownloader/cfg:/opt/JDownloader/cfg --name jdownloader jaymoulin/rpi-jdownloader
docker run -d --restart=always -v ~/Downloads:/root/Downloads -v ~/jdownloader/cfg:/opt/JDownloader/cfg --name jdownloader jaymoulin/jdownloader
```

You can replace `~/Downloads` with the folder you want your downloaded files to go.
Expand All @@ -38,7 +37,7 @@ Everything else can be configurable on your MyJDownloader account : https://my.j
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
Binary file modified logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions manifest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
image: jaymoulin/jdownloader:$FULLVERSION
manifests:
-
image: jaymoulin/jdownloader:$VERSION-arm32v6
platform:
architecture: arm
variant: v6
os: linux
-
image: jaymoulin/jdownloader:$VERSION-arm64v8
platform:
architecture: arm
variant: v8
os: linux
-
image: jaymoulin/jdownloader:$VERSION-amd64
platform:
architecture: arm64
os: linux
-
image: jaymoulin/jdownloader:$VERSION-i386
platform:
architecture: 386
os: linux

0 comments on commit 116d69f

Please sign in to comment.