Skip to content

Commit

Permalink
fixes arm versions
Browse files Browse the repository at this point in the history
  • Loading branch information
jaymoulin committed Dec 13, 2017
1 parent 1758898 commit 7ede48a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 11 deletions.
13 changes: 8 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM openjdk:jre-alpine as builder

COPY qemu-*-static /usr/bin/
COPY qemu-aarch64-static /usr/bin/
COPY qemu-arm-static /usr/bin/

FROM builder

Expand All @@ -9,10 +10,12 @@ LABEL maintainer="Jay MOULIN <[email protected]> <https://twitter.com/MoulinJa

# 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 /usr/bin/tini "https://github.com/krallin/tini/releases/download/v0.16.1/tini-static-${ARCH}" --no-check-certificate && chmod +x /usr/bin/tini && \
RUN mkdir -p /opt/JDownloader/ && \
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 /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
Expand Down
22 changes: 16 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
VERSION ?= 0.4.2
VERSION ?= 0.4.3
CACHE ?= --no-cache=1
FULLVERSION ?= ${VERSION}
archs = amd64 arm32v6 arm64v8 i386
archs ?= amd64 arm32v6 arm64v8 i386

.PHONY: all build publish latest
all: build publish latest
build:
rm qemu-*-static
qemu-arm-static:
cp /usr/bin/qemu-arm-static .
qemu-aarch64-static:
cp /usr/bin/qemu-aarch64-static .
build: qemu-arm-static 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; \
if [ $(arch) = arm32v6 ]; \
then archi=armhf; \
image=larmog\\/armhf-alpine-java:jdk-8u73; \
elif [ $(arch) = arm64v8 ]; \
then archi=arm64; \
image=larmog\\/armhf-alpine-java:jdk-8u73; \
else \
archi=$(arch); \
image=${arch}\\/openjdk:jre-alpine; \
fi; \
cat Dockerfile | sed "s/FROM openjdk:jre-alpine/FROM $$image/g" > .Dockerfile; \
docker build -t jaymoulin/jdownloader:${VERSION}-$(arch) -f .Dockerfile --build-arg ARCH=$${archi} ${CACHE} .;\
)
publish:
Expand Down

0 comments on commit 7ede48a

Please sign in to comment.