docker-davos/Dockerfile.aarch64
2019-02-22 18:11:32 -08:00

66 lines
1.7 KiB
Docker
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

FROM gradle:4.10 as buildstage
ARG DAVOS_RELEASE
USER root
# Add qemu to build on x86_64 systems
COPY qemu-aarch64-static /usr/bin
RUN \
echo "**** Install build requirements ****" && \
apt-get update && apt-get install -y jq && \
echo "**** Download Davos ****" && \
if [ -z ${DAVOS_RELEASE+x} ]; then \
DAVOS_RELEASE=$(curl -sX GET https://api.github.com/repos/linuxserver/davos/releases/latest \
| jq -r '. | .tag_name'); \
fi && \
curl -o \
/tmp/davos.tar.gz -L \
"https://github.com/linuxserver/davos/archive/${DAVOS_RELEASE}.tar.gz" && \
echo "**** Acceptence Tests ****" && \
mkdir -p \
/app/davos-test/ && \
tar xf \
/tmp/davos.tar.gz -C \
/app/davos-test/ --strip-components=1 && \
cd /app/davos-test/ && \
gradle build cucumber && \
echo "**** Build Davos For Release ****" && \
mkdir -p \
/app/davos/ && \
tar xf \
/tmp/davos.tar.gz -C \
/app/davos/ --strip-components=1 && \
cd /app/davos/ && \
gradle clean build && \
echo "**** Copy Finished Jar ****" && \
cp build/libs/*.jar /davos.jar && \
chmod 755 /davos.jar
FROM lsiobase/alpine.arm64:3.9
# set version label
ARG BUILD_DATE
ARG VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="JAGFin1,Thelamer"
# Add qemu to build on x86_64 systems
COPY qemu-aarch64-static /usr/bin
# install packages
RUN \
apk add --no-cache \
curl && \
apk add --no-cache \
--repository http://nl.alpinelinux.org/alpine/edge/community \
openjdk8-jre
# copy files from build stage and local files
COPY --from=buildstage /davos.jar /app/davos/davos.jar
COPY root/ /
# ports and volumes
EXPOSE 8080
WORKDIR /app/davos
VOLUME /config /download