Skip to content
Snippets Groups Projects
Commit 1ad036c8 authored by Andri Joos's avatar Andri Joos :blush:
Browse files

use flutter tar.xz instead of git

parent debe6b90
No related branches found
No related tags found
No related merge requests found
ARG IMAGE_SERVER="registry.420joos.dev"
ARG FLUTTER_VERSION="3.24.0"
ARG DEPENDENCY_DIR="/tmp/dependencies"
ARG FLUTTER_URL="https://github.com/flutter/flutter"
FROM ubuntu:24.04 AS download
......@@ -11,15 +10,16 @@ ARG DEPENDENCY_DIR
ARG FLUTTER_DIR="$DEPENDENCY_DIR/flutter"
ARG TMP_DEPENDENCIES_DIR="$DEPENDENCY_DIR/tmp"
ARG GLIBC_URL="https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r1"
ARG FLUTTER_DOWNLOAD_FILE="flutter.tar.xz"
RUN apt update \
&& apt install -y wget git \
&& git clone -b $FLUTTER_VERSION --depth 1 "${FLUTTER_URL}.git" $FLUTTER_DIR \
&& cd $FLUTTER_DIR \
&& git gc --prune=all \
# && wget https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_${FLUTTER_VERSION}-stable.tar.xz \
# && tar xf flutter_linux_${FLUTTER_VERSION}-stable.tar.xz --strip-components=1 --directory $FLUTTER_DIR \
&& wget "$GLIBC_URL/glibc-2.35-r1.apk" --directory-prefix $TMP_DEPENDENCIES_DIR \
&& apt install -y wget xz-utils
RUN mkdir -p ${FLUTTER_DIR} \
&& 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
RUN wget "$GLIBC_URL/glibc-2.35-r1.apk" --directory-prefix $TMP_DEPENDENCIES_DIR \
&& wget "$GLIBC_URL/glibc-bin-2.35-r1.apk" --directory-prefix $TMP_DEPENDENCIES_DIR
......@@ -29,7 +29,6 @@ ARG DEPENDENCY_DIR
ENV FLUTTER_HOME="/flutter"
ENV PATH=$PATH:$FLUTTER_HOME/bin
ENV FLUTTER_GIT_URL="unknown source"
COPY --from=download $DEPENDENCY_DIR /
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment