From b5a3fa67d92df351c0be295c0d9e09766826f06f Mon Sep 17 00:00:00 2001 From: Koenkk Date: Sat, 16 Jun 2018 22:53:33 +0200 Subject: [PATCH] Fix commit variable arm docker images. --- docker/Dockerfile.arm32v6 | 6 ++++-- docker/Dockerfile.arm64v8 | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/docker/Dockerfile.arm32v6 b/docker/Dockerfile.arm32v6 index 7b7ac3335..e76603b21 100644 --- a/docker/Dockerfile.arm32v6 +++ b/docker/Dockerfile.arm32v6 @@ -5,15 +5,17 @@ ENV QEMU_EXECVE 1 COPY docker/qemu-arm-static /usr/bin WORKDIR /app +# Write .hash.json +ARG COMMIT +RUN [ "qemu-aarch64-static", "/bin/sh", "-c", "echo {\\\"hash\\\": \\\"$COMMIT\\\"} > .b.json" ] + # Copy files & install dependencies ADD . /app -ARG COMMIT RUN [ "qemu-arm-static", "/bin/sh", "-c", \ "cp /app/data/configuration.yaml /app && \ cp /app/docker/run.sh /app && chmod +x /app/run.sh && \ apk add --update --no-cache make gcc g++ python linux-headers udev nodejs git && \ npm install --unsafe-perm && \ - echo '{\"hash\": \"$COMMIT\"}' > .hash.json && \ apk del make gcc g++ python linux-headers udev git"] # Entrypoint diff --git a/docker/Dockerfile.arm64v8 b/docker/Dockerfile.arm64v8 index d7012b384..3e5a08966 100644 --- a/docker/Dockerfile.arm64v8 +++ b/docker/Dockerfile.arm64v8 @@ -5,15 +5,17 @@ ENV QEMU_EXECVE 1 COPY docker/qemu-aarch64-static /usr/bin WORKDIR /app +# Write .hash.json +ARG COMMIT +RUN [ "qemu-aarch64-static", "/bin/sh", "-c", "echo {\\\"hash\\\": \\\"$COMMIT\\\"} > .b.json" ] + # Copy files & install dependencies ADD . /app -ARG COMMIT RUN [ "qemu-aarch64-static", "/bin/sh", "-c", \ "cp /app/data/configuration.yaml /app && \ cp /app/docker/run.sh /app && chmod +x /app/run.sh && \ apk add --update --no-cache make gcc g++ python linux-headers udev nodejs git && \ npm install --unsafe-perm && \ - echo '{\"hash\": \"$COMMIT\"}' > .hash.json && \ apk del make gcc g++ python linux-headers udev git"] # Entrypoint