diff --git a/docker/aarch64/alpine b/docker/aarch64/alpine index 111e267..fc3a180 100644 --- a/docker/aarch64/alpine +++ b/docker/aarch64/alpine @@ -16,6 +16,7 @@ RUN apk add \ boost-dev \ bzip2-static \ cmake \ + curl \ diffutils \ elfutils-dev \ file \ @@ -83,3 +84,28 @@ RUN apk add \ RUN ln -sf /usr/bin/aclocal-1.18 /usr/bin/aclocal-1.16 RUN ln -sf /usr/bin/automake-1.18 /usr/bin/automake-1.16 + +ARG RUST_VERSION=stable + +ENV RUSTUP_HOME=/opt/rustup +ENV CARGO_HOME=/opt/cargo +ENV PATH="/opt/cargo/bin:${PATH}" + +RUN curl --proto '=https' --tlsv1.2 -fsSL \ + https://sh.rustup.rs -o /tmp/rustup-init.sh \ + && sh /tmp/rustup-init.sh \ + -y \ + --no-modify-path \ + --profile minimal \ + --default-toolchain "${RUST_VERSION}" \ + && rm /tmp/rustup-init.sh + +ARG GID +ARG UID +RUN chown -R "${UID}:${GID}" /opt/rustup +RUN chown -R "${UID}:${GID}" /opt/cargo + +RUN rustc --version \ + && cargo --version \ + && rustup target list --installed + diff --git a/docker/x86_64/flutter b/docker/any/flutter similarity index 100% rename from docker/x86_64/flutter rename to docker/any/flutter diff --git a/docker/x86_64/alpine b/docker/x86_64/alpine index 4c128fa..6d5a48f 100644 --- a/docker/x86_64/alpine +++ b/docker/x86_64/alpine @@ -16,6 +16,7 @@ RUN apk add \ boost-dev \ bzip2-static \ cmake \ + curl \ diffutils \ elfutils-dev \ file \ @@ -83,3 +84,28 @@ RUN apk add \ RUN ln -sf /usr/bin/aclocal-1.18 /usr/bin/aclocal-1.16 RUN ln -sf /usr/bin/automake-1.18 /usr/bin/automake-1.16 + +ARG RUST_VERSION=stable + +ENV RUSTUP_HOME=/opt/rustup +ENV CARGO_HOME=/opt/cargo +ENV PATH="/opt/cargo/bin:${PATH}" + +RUN curl --proto '=https' --tlsv1.2 -fsSL \ + https://sh.rustup.rs -o /tmp/rustup-init.sh \ + && sh /tmp/rustup-init.sh \ + -y \ + --no-modify-path \ + --profile minimal \ + --default-toolchain "${RUST_VERSION}" \ + && rm /tmp/rustup-init.sh + +ARG GID +ARG UID +RUN chown -R "${UID}:${GID}" /opt/rustup +RUN chown -R "${UID}:${GID}" /opt/cargo + +RUN rustc --version \ + && cargo --version \ + && rustup target list --installed + diff --git a/docker/x86_64/mingw64 b/docker/x86_64/mingw64 index 2f99846..5dc0062 100644 --- a/docker/x86_64/mingw64 +++ b/docker/x86_64/mingw64 @@ -11,6 +11,7 @@ RUN apk add \ binutils \ bison \ bzip2 \ + ca-certificates \ clang21-extra-tools \ cmake \ curl \ @@ -1193,6 +1194,37 @@ RUN (cp ${MY_MINGW_DIR}/lib/*.dll ${MY_MINGW_DIR}/bin || echo "no dll's found") && rm -rf /3rd_party \ && rm -rf /root/.wine +ARG RUST_VERSION=stable + +ENV RUSTUP_HOME=/opt/rustup +ENV CARGO_HOME=/opt/cargo +ENV PATH="/opt/cargo/bin:${PATH}" + +RUN curl --proto '=https' --tlsv1.2 -fsSL \ + https://sh.rustup.rs -o /tmp/rustup-init.sh \ + && sh /tmp/rustup-init.sh \ + -y \ + --no-modify-path \ + --profile minimal \ + --default-host x86_64-unknown-linux-musl \ + --default-toolchain "${RUST_VERSION}" \ + --target x86_64-pc-windows-gnu \ + && rm /tmp/rustup-init.sh + +ENV CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER="${MY_MINGW_PREFIX}-gcc" +ENV CC_x86_64_pc_windows_gnu="${MY_MINGW_PREFIX}-gcc" +ENV CXX_x86_64_pc_windows_gnu="${MY_MINGW_PREFIX}-g++" +ENV AR_x86_64_pc_windows_gnu="${MY_MINGW_PREFIX}-ar" + +RUN rustc --version \ + && cargo --version \ + && rustup target list --installed + +ARG GID +ARG UID +RUN chown -R "${UID}:${GID}" /opt/rustup +RUN chown -R "${UID}:${GID}" /opt/cargo + USER $USERNAME WORKDIR /home/$USERNAME diff --git a/src/scripts/make_flutter.sh b/src/scripts/make_flutter.sh index 3b9973a..cac6c55 100755 --- a/src/scripts/make_flutter.sh +++ b/src/scripts/make_flutter.sh @@ -16,7 +16,7 @@ if [ -f "${PROJECT_SOURCE_DIR}/web/${PROJECT_NAME}/pubspec.yaml" ]; then --build-arg UID=$(id -u) \ --build-arg GID=$(id -g) \ -t ${FLUTTER_TAG_NAME} \ - -f "${PROJECT_SOURCE_DIR}/docker/x86_64/flutter" || exit 1 + -f "${PROJECT_SOURCE_DIR}/docker/any/flutter" || exit 1 docker run -td \ --name ${FLUTTER_CONTAINER_NAME} \