diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 659a1570e9af546f1a7cc2a67bb9f43c4011d8ef..9eccceab498ee07432dab811824264285d878831 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,6 +8,7 @@ variables: .build_flutter_base: variables: + DOCKER_BUILDX_PLATFORMS: linux/amd64 BUILD_ARGS: FLUTTER_VERSION=${VERSION} "3.24.5": diff --git a/.vscode/tasks.json b/.vscode/tasks.json index d45ac0c80973473146a2940a0a47b15907852167..12b091664cf4717880e5999700c50045c8572c50 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -3,16 +3,6 @@ // for the documentation about the tasks.json format "version": "2.0.0", "tasks": [ - { - "label": "build", - "command": "docker", - "args": [ - "build", - "--build-arg", - "FLUTTER_VERSION=${input:flutterVersion}", - ".", - ], - }, { "label": "buildx build", "command": "docker", @@ -22,7 +12,7 @@ "--build-arg", "FLUTTER_VERSION=${input:flutterVersion}", "--platform", - "linux/arm64,linux/amd64", + "linux/amd64", ".", ], }, diff --git a/Dockerfile b/Dockerfile index 44840d046faa7cc6259397acc3b4130b8b702536..accb667f3c5c90b50a333b653885ba46685cd736 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,28 +17,26 @@ RUN apt update \ RUN mkdir -p ${FLUTTER_DIR} -RUN if [ "$(uname -m)" = "x86_64" ]; then \ - wget https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_${FLUTTER_VERSION}-stable.tar.xz -O ${FLUTTER_DOWNLOAD_FILE} \ - && tar -xf ${FLUTTER_DOWNLOAD_FILE} --strip-components=1 --directory $FLUTTER_DIR; \ - fi +RUN wget https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_${FLUTTER_VERSION}-stable.tar.xz -O ${FLUTTER_DOWNLOAD_FILE} \ + && tar -xf ${FLUTTER_DOWNLOAD_FILE} --strip-components=1 --directory $FLUTTER_DIR; # There is no official flutter arm64 release, so we must use the github repo # Flutter on arch currently has warnings because channel and repository source are not set -RUN if [ "$(uname -m)" = "aarch64" ]; then \ - git clone --depth 1 https://github.com/flutter/flutter.git ${FLUTTER_DIR} \ - && cd ${FLUTTER_DIR} \ - && git fetch origin tag ${FLUTTER_VERSION} \ - && git checkout tags/${FLUTTER_VERSION} \ - && DART_SDK_PATH="${FLUTTER_DIR}/bin/cache/dart-sdk" \ - && ENGINE_REALM=$(cat "${FLUTTER_DIR}/bin/internal/engine.realm" | tr -d '[:space:]') \ - && ENGINE_VERSION=$(cat "${FLUTTER_DIR}/bin/internal/engine.version") \ - && DART_ZIP_NAME="dart-sdk-linux-arm64.zip" \ - && wget "https://storage.googleapis.com/flutter_infra_release/flutter/${ENGINE_VERSION}/${DART_ZIP_NAME}" -O ${DART_ZIP_NAME} \ - && unzip -o -q "${DART_ZIP_NAME}" -d "${FLUTTER_DIR}/bin/cache" \ - && /usr/bin/find "${DART_SDK_PATH}" -type d -exec chmod 755 {} \; \ - && /usr/bin/find "${DART_SDK_PATH}" -type f -perm /u+x -exec chmod a+x,a+r {} \; \ - && echo "${ENGINE_VERSION}" > "${FLUTTER_DIR}/bin/cache/engine-dart-sdk.stamp"; \ - fi +# RUN if [ "$(uname -m)" = "aarch64" ]; then \ +# git clone --depth 1 https://github.com/flutter/flutter.git ${FLUTTER_DIR} \ +# && cd ${FLUTTER_DIR} \ +# && git fetch origin tag ${FLUTTER_VERSION} \ +# && git checkout tags/${FLUTTER_VERSION} \ +# && DART_SDK_PATH="${FLUTTER_DIR}/bin/cache/dart-sdk" \ +# && ENGINE_REALM=$(cat "${FLUTTER_DIR}/bin/internal/engine.realm" | tr -d '[:space:]') \ +# && ENGINE_VERSION=$(cat "${FLUTTER_DIR}/bin/internal/engine.version") \ +# && DART_ZIP_NAME="dart-sdk-linux-arm64.zip" \ +# && wget "https://storage.googleapis.com/flutter_infra_release/flutter/${ENGINE_VERSION}/${DART_ZIP_NAME}" -O ${DART_ZIP_NAME} \ +# && unzip -o -q "${DART_ZIP_NAME}" -d "${FLUTTER_DIR}/bin/cache" \ +# && /usr/bin/find "${DART_SDK_PATH}" -type d -exec chmod 755 {} \; \ +# && /usr/bin/find "${DART_SDK_PATH}" -type f -perm /u+x -exec chmod a+x,a+r {} \; \ +# && echo "${ENGINE_VERSION}" > "${FLUTTER_DIR}/bin/cache/engine-dart-sdk.stamp"; \ +# fi FROM alpine:3.20.3