This repository was archived by the owner on Oct 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 87
Implement multi stage builds (closes #4) #16
Draft
matsp
wants to merge
7
commits into
master
Choose a base branch
from
feature/multi_stage_builds_#4
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
83f837f
Test stage builds
matsp b0edd6c
Merge branch 'master' into feature/multi_stage_builds_#4
matsp 25e4748
Add base image
matsp e8996b3
Reduced to base and android image
matsp 3d166f5
Merge commands
matsp d7f7c46
Remove chown.sh
matsp 4218b64
Adjust README
matsp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| ARG TAG | ||
| FROM matspfeiffer/flutter:$TAG | ||
|
|
||
| ENV JAVA_VERSION="8" | ||
| ENV ANDROID_TOOLS_URL="https://dl.google.com/android/repository/commandlinetools-linux-6858069_latest.zip" | ||
| ENV ANDROID_VERSION="29" | ||
| ENV ANDROID_BUILD_TOOLS_VERSION="29.0.3" | ||
| ENV ANDROID_ARCHITECTURE="x86_64" | ||
| ENV ANDROID_SDK_ROOT="/opt/android" | ||
| ENV FLUTTER_EMULATOR_NAME="flutter_emulator" | ||
| ENV PATH="$ANDROID_SDK_ROOT/cmdline-tools/latest/bin:$ANDROID_SDK_ROOT/emulator:$ANDROID_SDK_ROOT/platform-tools:$ANDROID_SDK_ROOT/platforms:$PATH" | ||
|
|
||
| # install all dependencies | ||
| ENV DEBIAN_FRONTEND="noninteractive" | ||
| RUN apt-get update \ | ||
| && apt-get install --yes --no-install-recommends openjdk-$JAVA_VERSION-jdk libglvnd0 xauth x11-xserver-utils libpulse0 libxcomposite1 libgl1-mesa-glx \ | ||
| && rm -rf /var/lib/{apt,dpkg,cache,log} | ||
|
|
||
| # android sdk & emulator setup | ||
| RUN mkdir -p $ANDROID_SDK_ROOT \ | ||
| && mkdir -p /root/.android \ | ||
| && touch /root/.android/repositories.cfg \ | ||
| && curl -o android_tools.zip $ANDROID_TOOLS_URL \ | ||
| && unzip -qq -d "$ANDROID_SDK_ROOT" android_tools.zip \ | ||
| && rm android_tools.zip \ | ||
| && mkdir -p $ANDROID_SDK_ROOT/cmdline-tools/latest \ | ||
| && mv $ANDROID_SDK_ROOT/cmdline-tools/bin $ANDROID_SDK_ROOT/cmdline-tools/latest/bin \ | ||
| && mv $ANDROID_SDK_ROOT/cmdline-tools/lib $ANDROID_SDK_ROOT/cmdline-tools/latest/lib \ | ||
| && yes "y" | sdkmanager --update \ | ||
| && yes "y" | sdkmanager "extras;google;m2repository" "extras;android;m2repository" \ | ||
| && yes "y" | sdkmanager "build-tools;$ANDROID_BUILD_TOOLS_VERSION" \ | ||
| && yes "y" | sdkmanager "platforms;android-$ANDROID_VERSION" \ | ||
| && yes "y" | sdkmanager "platform-tools" \ | ||
| && yes "y" | sdkmanager "system-images;android-$ANDROID_VERSION;google_apis_playstore;$ANDROID_ARCHITECTURE" \ | ||
| && flutter emulators --create | ||
|
|
||
| COPY flutter-android-emulator.sh /usr/local/bin/flutter-android-emulator | ||
| ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ] | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| FROM ubuntu:20.04 | ||
|
|
||
| ARG FLUTTER_CHANNEL | ||
| ARG FLUTTER_VERSION | ||
| ENV FLUTTER_URL="https://storage.googleapis.com/flutter_infra/releases/$FLUTTER_CHANNEL/linux/flutter_linux_$FLUTTER_VERSION-$FLUTTER_CHANNEL.tar.xz" | ||
| ENV FLUTTER_HOME="/opt/flutter" | ||
| ENV PATH="$FLUTTER_HOME/bin:$PATH" | ||
|
|
||
| # install all dependencies | ||
| ENV DEBIAN_FRONTEND="noninteractive" | ||
| RUN apt-get update \ | ||
| && apt-get install --yes --no-install-recommends curl unzip sed git bash xz-utils ca-certificates \ | ||
| && rm -rf /var/lib/{apt,dpkg,cache,log} | ||
|
|
||
|
|
||
| # flutter | ||
| RUN curl -o flutter.tar.xz $FLUTTER_URL \ | ||
| && mkdir -p $FLUTTER_HOME \ | ||
| && tar xf flutter.tar.xz -C /opt \ | ||
| && rm flutter.tar.xz \ | ||
| && flutter config --no-analytics --enable-web \ | ||
| && flutter precache \ | ||
| && yes "y" | flutter doctor --android-licenses | ||
|
|
||
| COPY entrypoint.sh /usr/local/bin/ | ||
| ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ] | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,4 @@ | |
| # execute flutter with arguments | ||
| flutter --no-version-check "$@" | ||
|
|
||
|
|
||
| /bin/bash /usr/local/bin/chown.sh | ||
|
|
||
| exit | ||
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"With this" -> "With these"