diff --git a/ChangeLog.md b/ChangeLog.md index c107205b..bcfaeb0f 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -6,6 +6,7 @@ ## Features * changed docker image to multi-architecture including Raspberry Pi, reduced image size * added trailing wildcard to "ebuspicloader" port +* added i386 and arm64 architectures to docker image # 21.1 (2021-01-10) diff --git a/contrib/docker/Dockerfile.arm64v8 b/contrib/docker/Dockerfile.arm64v8 new file mode 100644 index 00000000..1fcf3965 --- /dev/null +++ b/contrib/docker/Dockerfile.arm64v8 @@ -0,0 +1,46 @@ +FROM multiarch/qemu-user-static as qemu +FROM arm64v8/debian:stretch as build +COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +RUN apt-get update && apt-get install -y \ + libmosquitto-dev libstdc++6 libc6 libgcc1 \ + curl \ + autoconf automake g++ make git \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR /build + +ENV EBUSD_VERSION 21.1 +ENV EBUSD_ARCH arm64v8 + +RUN git clone https://github.com/john30/ebusd.git /build \ + && ./make_debian.sh + +ARG UPLOAD_URL +ARG UPLOAD_CREDENTIALS +ARG UPLOAD_ONLY + + + +FROM arm64v8/debian:stretch-slim +COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +RUN apt-get update && apt-get install -y \ + logrotate libmosquitto1 libstdc++6 libc6 libgcc1 \ + && rm -rf /var/lib/apt/lists/* + +LABEL maintainer "ebusd@ebusd.eu" + +ENV EBUSD_VERSION 21.1 +ENV EBUSD_ARCH arm64v8 + +LABEL version "${EBUSD_VERSION}-${EBUSD_ARCH}-devel" + +COPY --from=build /build/ebusd-*_mqtt1.deb ebusd.deb + +RUN dpkg -i ebusd.deb \ + && rm -f ebusd.deb /usr/bin/qemu-aarch64-static + +EXPOSE 8888 + +COPY docker-entrypoint.sh / +ENTRYPOINT ["/docker-entrypoint.sh"] +CMD ["-f", "--scanconfig"] diff --git a/contrib/docker/Dockerfile.i386 b/contrib/docker/Dockerfile.i386 new file mode 100644 index 00000000..3fda2bfc --- /dev/null +++ b/contrib/docker/Dockerfile.i386 @@ -0,0 +1,46 @@ +FROM multiarch/qemu-user-static as qemu +FROM i386/debian:stretch as build +COPY --from=qemu /usr/bin/qemu-i386-static /usr/bin/ +RUN apt-get update && apt-get install -y \ + libmosquitto-dev libstdc++6 libc6 libgcc1 \ + curl \ + autoconf automake g++ make git \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR /build + +ENV EBUSD_VERSION 21.1 +ENV EBUSD_ARCH i386 + +RUN git clone https://github.com/john30/ebusd.git /build \ + && ./make_debian.sh + +ARG UPLOAD_URL +ARG UPLOAD_CREDENTIALS +ARG UPLOAD_ONLY + + + +FROM i386/debian:stretch-slim +COPY --from=qemu /usr/bin/qemu-i386-static /usr/bin/ +RUN apt-get update && apt-get install -y \ + logrotate libmosquitto1 libstdc++6 libc6 libgcc1 \ + && rm -rf /var/lib/apt/lists/* + +LABEL maintainer "ebusd@ebusd.eu" + +ENV EBUSD_VERSION 21.1 +ENV EBUSD_ARCH i386 + +LABEL version "${EBUSD_VERSION}-${EBUSD_ARCH}-devel" + +COPY --from=build /build/ebusd-*_mqtt1.deb ebusd.deb + +RUN dpkg -i ebusd.deb \ + && rm -f ebusd.deb /usr/bin/qemu-i386-static + +EXPOSE 8888 + +COPY docker-entrypoint.sh / +ENTRYPOINT ["/docker-entrypoint.sh"] +CMD ["-f", "--scanconfig"] diff --git a/contrib/docker/README.md b/contrib/docker/README.md index 0f9e4a8e..644e56e4 100644 --- a/contrib/docker/README.md +++ b/contrib/docker/README.md @@ -17,7 +17,9 @@ To download the latest release image from the hub, use the following command: The image is able to run on any of the following architectures and the right image will be picked automatically: * amd64 +* i386 * arm32v7 +* arm64v8 In addition to the default "latest" tag, a development set of images is available with "devel" tag. This is built automatically with every commit to the git repository. Run the following command to use it: diff --git a/contrib/docker/manifest.template b/contrib/docker/manifest.template index 9ac71dd9..4f5aeadb 100644 --- a/contrib/docker/manifest.template +++ b/contrib/docker/manifest.template @@ -4,8 +4,17 @@ manifests: platform: architecture: amd64 os: linux + - image: %image_name%-i386 + platform: + architecture: i386 + os: linux - image: %image_name%-arm32v7 platform: architecture: arm os: linux variant: v7 + - image: %image_name%-arm64v8 + platform: + architecture: arm64 + os: linux + variant: v8 diff --git a/contrib/docker/release/Dockerfile.arm64v8 b/contrib/docker/release/Dockerfile.arm64v8 new file mode 100644 index 00000000..553c5bee --- /dev/null +++ b/contrib/docker/release/Dockerfile.arm64v8 @@ -0,0 +1,46 @@ +FROM multiarch/qemu-user-static as qemu +FROM arm64v8/debian:stretch as build +COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +RUN apt-get update && apt-get install -y \ + libmosquitto-dev libstdc++6 libc6 libgcc1 \ + curl \ + autoconf automake g++ make git \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR /build + +ENV EBUSD_VERSION 21.1 +ENV EBUSD_ARCH arm64v8 + +RUN git clone https://github.com/john30/ebusd.git /build \ + && ./make_all.sh + +ARG UPLOAD_URL +ARG UPLOAD_CREDENTIALS +ARG UPLOAD_ONLY +RUN if [ -n "$UPLOAD_URL" ] && [ -n "$UPLOAD_CREDENTIALS" ]; then for img in ebusd-*.deb; do echo "upload $img"; curl -u "$UPLOAD_CREDENTIALS" -s -X POST --data-binary "@$img" -H "Content-Type: application/octet-stream" "$UPLOAD_URL/$img?a=$EBUSD_ARCH&v=$EBUSD_VERSION"; done; if [ -n "$UPLOAD_ONLY" ]; then echo "stopping for upload only"; exit 139; fi fi + + +FROM arm64v8/debian:stretch-slim +COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +RUN apt-get update && apt-get install -y \ + logrotate libmosquitto1 libstdc++6 libc6 libgcc1 \ + && rm -rf /var/lib/apt/lists/* + +LABEL maintainer "ebusd@ebusd.eu" + +ENV EBUSD_VERSION 21.1 +ENV EBUSD_ARCH arm64v8 + +LABEL version "${EBUSD_VERSION}-${EBUSD_ARCH}" + +COPY --from=build /build/ebusd-*_mqtt1.deb ebusd.deb + +RUN dpkg -i ebusd.deb \ + && rm -f ebusd.deb /usr/bin/qemu-aarch64-static + +EXPOSE 8888 + +COPY docker-entrypoint.sh / +ENTRYPOINT ["/docker-entrypoint.sh"] +CMD ["-f", "--scanconfig"] diff --git a/contrib/docker/release/Dockerfile.i386 b/contrib/docker/release/Dockerfile.i386 new file mode 100644 index 00000000..a60eb908 --- /dev/null +++ b/contrib/docker/release/Dockerfile.i386 @@ -0,0 +1,46 @@ +FROM multiarch/qemu-user-static as qemu +FROM i386/debian:stretch as build +COPY --from=qemu /usr/bin/qemu-i386-static /usr/bin/ +RUN apt-get update && apt-get install -y \ + libmosquitto-dev libstdc++6 libc6 libgcc1 \ + curl \ + autoconf automake g++ make git \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR /build + +ENV EBUSD_VERSION 21.1 +ENV EBUSD_ARCH i386 + +RUN git clone https://github.com/john30/ebusd.git /build \ + && ./make_all.sh + +ARG UPLOAD_URL +ARG UPLOAD_CREDENTIALS +ARG UPLOAD_ONLY +RUN if [ -n "$UPLOAD_URL" ] && [ -n "$UPLOAD_CREDENTIALS" ]; then for img in ebusd-*.deb; do echo "upload $img"; curl -u "$UPLOAD_CREDENTIALS" -s -X POST --data-binary "@$img" -H "Content-Type: application/octet-stream" "$UPLOAD_URL/$img?a=$EBUSD_ARCH&v=$EBUSD_VERSION"; done; if [ -n "$UPLOAD_ONLY" ]; then echo "stopping for upload only"; exit 139; fi fi + + +FROM i386/debian:stretch-slim +COPY --from=qemu /usr/bin/qemu-i386-static /usr/bin/ +RUN apt-get update && apt-get install -y \ + logrotate libmosquitto1 libstdc++6 libc6 libgcc1 \ + && rm -rf /var/lib/apt/lists/* + +LABEL maintainer "ebusd@ebusd.eu" + +ENV EBUSD_VERSION 21.1 +ENV EBUSD_ARCH i386 + +LABEL version "${EBUSD_VERSION}-${EBUSD_ARCH}" + +COPY --from=build /build/ebusd-*_mqtt1.deb ebusd.deb + +RUN dpkg -i ebusd.deb \ + && rm -f ebusd.deb /usr/bin/qemu-i386-static + +EXPOSE 8888 + +COPY docker-entrypoint.sh / +ENTRYPOINT ["/docker-entrypoint.sh"] +CMD ["-f", "--scanconfig"]