diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index d126249..4c2a682 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -111,28 +111,29 @@ jobs: - uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0 with: driver-opts: network=host - - uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0 - if: ${{ startsWith(matrix.otp, '24') }} - with: - platforms: linux/${{ matrix.arch }} - cache-from: type=local,src=/tmp/.docker-buildx-cache,mode=max - build-args: | - BUILD_FROM=${{ steps.base_tag.outputs.image }} - OTP_VERSION=${{ matrix.otp }} - ELIXIR_VERSION=${{ matrix.elixir }} - BUILD_WITHOUT_QUIC=1 - EMQTT_BENCH_VERSION=0.4.5 - LUX_VERSION=lux-2.6 - file: ./Dockerfile - context: . - - uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0 - if: ${{ ! startsWith(matrix.otp, '24') }} + - name: Build and load docker image + uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0 with: platforms: "linux/${{ matrix.arch }}" + load: true # Load the image to the runner's docker daemon + tags: test-image:latest cache-from: type=local,src=/tmp/.docker-buildx-cache,mode=max build-args: | BUILD_FROM=${{ steps.base_tag.outputs.image }} OTP_VERSION=${{ matrix.otp }} ELIXIR_VERSION=${{ matrix.elixir }} + BUILD_WITHOUT_QUIC=${{ startsWith(matrix.otp, '24') && 1 || '' }} + EMQTT_BENCH_VERSION=${{ startsWith(matrix.otp, '24') && '0.4.5' || '' }} + LUX_VERSION=${{ startsWith(matrix.otp, '24') && 'lux-2.6' || '' }} file: ./Dockerfile context: . + - name: Test OTP 27 Image (Rust Toolchain should be installed) + if: startsWith(matrix.otp, '27') + run: | + docker run --rm test-image:latest bash -c 'rustup toolchain list' | \ + grep "1.88.0" + - name: Test non-OTP 27 Image (Rust Toolchain should NOT be installed) + if: "!startsWith(matrix.otp, '27')" + run: | + docker run --rm test-image:latest bash -c 'rustup toolchain list' | \ + grep "no installed toolchains" diff --git a/alpine3.15.1/Dockerfile b/alpine3.15.1/Dockerfile index d6248e5..4cb0cd0 100644 --- a/alpine3.15.1/Dockerfile +++ b/alpine3.15.1/Dockerfile @@ -49,8 +49,10 @@ RUN ln -s /usr/bin/python3 /usr/bin/python COPY get-cmake.sh /get-cmake.sh RUN /get-cmake.sh build -# Install Rustup +# Install Rustup to a system-wide location +ENV RUSTUP_HOME=/usr/local/lib/rustup +ENV CARGO_HOME=/usr/local/cargo RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none -ENV PATH="/root/.cargo/bin:${PATH}" +ENV PATH="/usr/local/cargo/bin:${PATH}" CMD [ "/bin/sh" ] diff --git a/alpine3.21.3/Dockerfile b/alpine3.21.3/Dockerfile index f6243df..9cc259d 100644 --- a/alpine3.21.3/Dockerfile +++ b/alpine3.21.3/Dockerfile @@ -47,8 +47,10 @@ RUN apk add --no-cache --virtual .build-deps \ COPY get-cmake.sh /get-cmake.sh RUN /get-cmake.sh build -# Install Rustup +# Install Rustup to a system-wide location +ENV RUSTUP_HOME=/usr/local/lib/rustup +ENV CARGO_HOME=/usr/local/cargo RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none -ENV PATH="/root/.cargo/bin:${PATH}" +ENV PATH="/usr/local/cargo/bin:${PATH}" CMD [ "/bin/sh" ] diff --git a/amzn2/Dockerfile b/amzn2/Dockerfile index 6cdbf21..170b0f2 100644 --- a/amzn2/Dockerfile +++ b/amzn2/Dockerfile @@ -65,8 +65,10 @@ RUN yum clean packages && \ ENV LC_ALL=C.UTF-8 ENV LANG=C.UTF-8 -# Install Rustup +# Install Rustup to a system-wide location +ENV RUSTUP_HOME=/usr/local/lib/rustup +ENV CARGO_HOME=/usr/local/cargo RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none -ENV PATH="/root/.cargo/bin:${PATH}" +ENV PATH="/usr/local/cargo/bin:${PATH}" CMD [ "/bin/bash" ] diff --git a/amzn2023/Dockerfile b/amzn2023/Dockerfile index b687d8b..8473535 100644 --- a/amzn2023/Dockerfile +++ b/amzn2023/Dockerfile @@ -33,8 +33,10 @@ WORKDIR / ENV LC_ALL=C.UTF-8 ENV LANG=C.UTF-8 -# Install Rustup +# Install Rustup to a system-wide location +ENV RUSTUP_HOME=/usr/local/lib/rustup +ENV CARGO_HOME=/usr/local/cargo RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none -ENV PATH="/root/.cargo/bin:${PATH}" +ENV PATH="/usr/local/cargo/bin:${PATH}" CMD [ "/bin/bash" ] diff --git a/debian10/Dockerfile b/debian10/Dockerfile index 704f165..84fb447 100644 --- a/debian10/Dockerfile +++ b/debian10/Dockerfile @@ -83,9 +83,11 @@ RUN /get-cmake.sh build && rm /get-cmake.sh ENV LC_ALL=C.UTF-8 ENV LANG=C.UTF-8 -# Install Rustup +# Install Rustup to a system-wide location +ENV RUSTUP_HOME=/usr/local/lib/rustup +ENV CARGO_HOME=/usr/local/cargo RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none -ENV PATH="/root/.cargo/bin:${PATH}" +ENV PATH="/usr/local/cargo/bin:${PATH}" WORKDIR / CMD [ "/bin/bash" ] diff --git a/debian11/Dockerfile b/debian11/Dockerfile index 72a8f0b..880f6f7 100644 --- a/debian11/Dockerfile +++ b/debian11/Dockerfile @@ -59,9 +59,11 @@ RUN apt-get clean\ ENV LC_ALL=C.UTF-8 ENV LANG=C.UTF-8 -# Install Rustup +# Install Rustup to a system-wide location +ENV RUSTUP_HOME=/usr/local/lib/rustup +ENV CARGO_HOME=/usr/local/cargo RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none -ENV PATH="/root/.cargo/bin:${PATH}" +ENV PATH="/usr/local/cargo/bin:${PATH}" WORKDIR / CMD [ "/bin/bash" ] diff --git a/debian12/Dockerfile b/debian12/Dockerfile index f0f994c..f31edc6 100644 --- a/debian12/Dockerfile +++ b/debian12/Dockerfile @@ -52,8 +52,10 @@ WORKDIR / ENV LC_ALL=C.UTF-8 ENV LANG=C.UTF-8 -# Install Rustup +# Install Rustup to a system-wide location +ENV RUSTUP_HOME=/usr/local/lib/rustup +ENV CARGO_HOME=/usr/local/cargo RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none -ENV PATH="/root/.cargo/bin:${PATH}" +ENV PATH="/usr/local/cargo/bin:${PATH}" CMD [ "/bin/bash" ] diff --git a/el7/Dockerfile b/el7/Dockerfile index c6d92c6..d5922ba 100644 --- a/el7/Dockerfile +++ b/el7/Dockerfile @@ -101,8 +101,10 @@ ENV LANG=en_US.UTF-8 # merge the two dirs ENV ACLOCAL_PATH=/usr/share/aclocal:/usr/local/share/aclocal -# Install Rustup +# Install Rustup to a system-wide location +ENV RUSTUP_HOME=/usr/local/lib/rustup +ENV CARGO_HOME=/usr/local/cargo RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none -ENV PATH="/root/.cargo/bin:${PATH}" +ENV PATH="/usr/local/cargo/bin:${PATH}" CMD [ "/bin/bash" ] diff --git a/el8/Dockerfile b/el8/Dockerfile index b23421c..31b9adf 100644 --- a/el8/Dockerfile +++ b/el8/Dockerfile @@ -58,9 +58,11 @@ RUN yum clean packages && \ ENV LC_ALL=C.UTF-8 ENV LANG=C.UTF-8 -# Install Rustup +# Install Rustup to a system-wide location +ENV RUSTUP_HOME=/usr/local/lib/rustup +ENV CARGO_HOME=/usr/local/cargo RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none -ENV PATH="/root/.cargo/bin:${PATH}" +ENV PATH="/usr/local/cargo/bin:${PATH}" WORKDIR / CMD [ "/bin/bash" ] diff --git a/el9/Dockerfile b/el9/Dockerfile index 9f5932e..b8c02ac 100644 --- a/el9/Dockerfile +++ b/el9/Dockerfile @@ -52,9 +52,11 @@ RUN dnf clean all && \ ENV LC_ALL=C.UTF-8 ENV LANG=C.UTF-8 -# Install Rustup +# Install Rustup to a system-wide location +ENV RUSTUP_HOME=/usr/local/lib/rustup +ENV CARGO_HOME=/usr/local/cargo RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none -ENV PATH="/root/.cargo/bin:${PATH}" +ENV PATH="/usr/local/cargo/bin:${PATH}" WORKDIR / CMD [ "/bin/bash" ] diff --git a/raspbian10/Dockerfile b/raspbian10/Dockerfile index 65e1460..ad4364c 100644 --- a/raspbian10/Dockerfile +++ b/raspbian10/Dockerfile @@ -80,9 +80,11 @@ RUN apt-get clean\ ENV LC_ALL=C.UTF-8 ENV LANG=C.UTF-8 -# Install Rustup +# Install Rustup to a system-wide location +ENV RUSTUP_HOME=/usr/local/lib/rustup +ENV CARGO_HOME=/usr/local/cargo RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none -ENV PATH="/root/.cargo/bin:${PATH}" +ENV PATH="/usr/local/cargo/bin:${PATH}" WORKDIR / CMD [ "/bin/bash" ] diff --git a/raspbian9/Dockerfile b/raspbian9/Dockerfile index ee835be..781315d 100644 --- a/raspbian9/Dockerfile +++ b/raspbian9/Dockerfile @@ -71,9 +71,11 @@ ENV PATH=/usr/local/python3.7.4/bin:$PATH RUN apt-get clean\ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* -# Install Rustup +# Install Rustup to a system-wide location +ENV RUSTUP_HOME=/usr/local/lib/rustup +ENV CARGO_HOME=/usr/local/cargo RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none -ENV PATH="/root/.cargo/bin:${PATH}" +ENV PATH="/usr/local/cargo/bin:${PATH}" WORKDIR / CMD [ "/bin/bash" ] diff --git a/ubuntu18.04/Dockerfile b/ubuntu18.04/Dockerfile index 318693a..c92ac33 100644 --- a/ubuntu18.04/Dockerfile +++ b/ubuntu18.04/Dockerfile @@ -95,8 +95,10 @@ RUN /get-cmake.sh build && rm /get-cmake.sh ENV LC_ALL=C.UTF-8 ENV LANG=C.UTF-8 -# Install Rustup +# Install Rustup to a system-wide location +ENV RUSTUP_HOME=/usr/local/lib/rustup +ENV CARGO_HOME=/usr/local/cargo RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none -ENV PATH="/root/.cargo/bin:${PATH}" +ENV PATH="/usr/local/cargo/bin:${PATH}" CMD [ "/bin/bash" ] diff --git a/ubuntu20.04/Dockerfile b/ubuntu20.04/Dockerfile index 2c533fe..fb3993c 100644 --- a/ubuntu20.04/Dockerfile +++ b/ubuntu20.04/Dockerfile @@ -64,9 +64,11 @@ RUN apt-get clean\ ENV LC_ALL=C.UTF-8 ENV LANG=C.UTF-8 -# Install Rustup +# Install Rustup to a system-wide location +ENV RUSTUP_HOME=/usr/local/lib/rustup +ENV CARGO_HOME=/usr/local/cargo RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none -ENV PATH="/root/.cargo/bin:${PATH}" +ENV PATH="/usr/local/cargo/bin:${PATH}" WORKDIR / CMD [ "/bin/bash" ] diff --git a/ubuntu22.04/Dockerfile b/ubuntu22.04/Dockerfile index 1afaf1e..03e4501 100644 --- a/ubuntu22.04/Dockerfile +++ b/ubuntu22.04/Dockerfile @@ -54,9 +54,11 @@ WORKDIR / ENV LC_ALL=C.UTF-8 ENV LANG=C.UTF-8 -# Install Rustup +# Install Rustup to a system-wide location +ENV RUSTUP_HOME=/usr/local/lib/rustup +ENV CARGO_HOME=/usr/local/cargo RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none -ENV PATH="/root/.cargo/bin:${PATH}" +ENV PATH="/usr/local/cargo/bin:${PATH}" WORKDIR / CMD [ "/bin/bash" ] diff --git a/ubuntu24.04/Dockerfile b/ubuntu24.04/Dockerfile index f7e72d0..ddcdf52 100644 --- a/ubuntu24.04/Dockerfile +++ b/ubuntu24.04/Dockerfile @@ -54,9 +54,11 @@ WORKDIR / ENV LC_ALL=C.UTF-8 ENV LANG=C.UTF-8 -# Install Rustup +# Install Rustup to a system-wide location +ENV RUSTUP_HOME=/usr/local/lib/rustup +ENV CARGO_HOME=/usr/local/cargo RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none -ENV PATH="/root/.cargo/bin:${PATH}" +ENV PATH="/usr/local/cargo/bin:${PATH}" WORKDIR / CMD [ "/bin/bash" ]