Skip to content

Commit

Permalink
Fixes tini architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
jaymoulin committed Dec 6, 2017
1 parent 8bb0f86 commit 1758898
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
14 changes: 8 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,25 @@ COPY qemu-*-static /usr/bin/

FROM builder

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

# archive extraction uses sevenzipjbinding library
# which is compiled against libstdc++
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 /usr/bin/tini "https://github.com/krallin/tini/releases/download/v0.16.1/tini-static-${ARCH}" --no-check-certificate && chmod +x /usr/bin/tini && \
apk del wget --purge .build-deps && \
rm /usr/bin/qemu-*-static
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
COPY daemon.sh /opt/JDownloader/
COPY default-config.json.dist /opt/JDownloader/org.jdownloader.api.myjdownloader.MyJDownloaderSettings.json.dist
COPY configure.sh /usr/bin/configure

VOLUME /root/Downloads
VOLUME /opt/JDownloader/cfg
WORKDIR /opt/JDownloader

CMD ["/sbin/tini", "--", "/opt/JDownloader/daemon.sh"]
CMD ["tini", "--", "/opt/JDownloader/daemon.sh"]
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ build:
cp /usr/bin/qemu-arm-static .
cp /usr/bin/qemu-aarch64-static .
$(foreach arch,$(archs), \
if [ $(arch) = arm32v6 ]; then archi=armhf; elif [ $(arch) = arm64v8 ]; then archi=arm64; else archi=$(arch); fi; \
cat Dockerfile | sed "s/FROM openjdk:jre-alpine/FROM ${arch}\/openjdk:jre-alpine/g" > .Dockerfile; \
docker build -t jaymoulin/jdownloader:${VERSION}-$(arch) -f .Dockerfile ${CACHE} .;\
docker build -t jaymoulin/jdownloader:${VERSION}-$(arch) -f .Dockerfile --build-arg ARCH=$${archi} ${CACHE} .;\
)
publish:
docker push jaymoulin/jdownloader
Expand Down

0 comments on commit 1758898

Please sign in to comment.