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

add Dockerfile

parents
No related branches found
No related tags found
No related merge requests found
ARG IMAGE_SERVER
ARG FLUTTER_VERSION="3.19.0"
ARG DEPENDENCY_DIR="/tmp/dependencies"
ARG FLUTTER_URL="https://github.com/flutter/flutter"
FROM $IMAGE_SERVER/ubuntu:22.04 as download
ARG FLUTTER_URL
ARG FLUTTER_VERSION
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"
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 \
&& wget "$GLIBC_URL/glibc-bin-2.35-r1.apk" --directory-prefix $TMP_DEPENDENCIES_DIR
FROM alpine:3.19
ARG DEPENDENCY_DIR
ENV FLUTTER_HOME "/flutter"
ENV PATH $PATH:$FLUTTER_HOME/bin
ENV FLUTTER_GIT_URL "unknown source"
COPY --from=download $DEPENDENCY_DIR /
RUN wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub \
&& apk add --no-cache --force-overwrite curl bash git tmp/glibc-2.35-r1.apk tmp/glibc-bin-2.35-r1.apk \
&& rm -r /tmp/* \
&& dart --disable-analytics && flutter config --no-analytics \
&& flutter precache --universal
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