Sign inSign up

cloudepicvue/gcloud-flutter

By cloudepicvue

•Updated over 2 years ago

flutter image with gcloud installed along with android sdk and licenses installed

Image
0

605

cloudepicvue/gcloud-flutter repository overview

⁠You can choose a base image that suits your needs, the one below has Flutter pre-installed

FROM ghcr.io/cirruslabs/flutter:3.13.8

⁠Set environment variables for the Android SDK location and the non-interactive flag

ENV ANDROID_SDK_ROOT /opt/android-sdk ENV DEBIAN_FRONTEND=noninteractive

⁠Install system dependencies

RUN apt-get update
&& apt-get install -y --no-install-recommends
wget
unzip
lib32stdc++6
libglu1-mesa
curl
git
python3
&& rm -rf /var/lib/apt/lists/*

⁠Download and install Android SDK

RUN mkdir -p ${ANDROID_SDK_ROOT}
&& mkdir -p ~/.android
# Silence warning. && echo 'count=0' > ~/.android/repositories.cfg
&& wget -O sdk-tools.zip https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip⁠
&& unzip sdk-tools.zip -d ${ANDROID_SDK_ROOT}
&& rm sdk-tools.zip

⁠Set environment variable

ENV PATH $PATH:${ANDROID_SDK_ROOT}/tools/bin

⁠Accept licenses before installing components, no need to echo y for each component

⁠The "yes" command is a program that will output "y" continuously until killed

RUN yes | sdkmanager --licenses

⁠Install the necessary Android SDK components

RUN sdkmanager "platform-tools" "platforms;android-30" "build-tools;30.0.3"

⁠Install Google Cloud SDK

RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt⁠ cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
&& curl https://packages.cloud.google.com/apt/doc/apt-key.gpg⁠ | gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg
&& apt-get update -y
&& apt-get install google-cloud-sdk -y

RUN apt-get clean

⁠Verify the installation

RUN flutter doctor

Tag summary

Content type

Image

Digest

sha256:5e4bffbbb…

Size

2 GB

Last updated

over 2 years ago

docker pull cloudepicvue/gcloud-flutter:3.19.3