Created
August 30, 2020 03:32
-
-
Save jcstr/8cd2f628a07b924de36f1fcf149e9dae to your computer and use it in GitHub Desktop.
flutter_docker
This file contains 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
Show hidden characters
{ | |
"name": "flutter_docker", | |
"context": "..", | |
"dockerFile": "../Dockerfile", | |
"remoteUser": "developer", | |
"mounts": [ | |
"source=/dev/bus/usb,target=/dev/bus/usb,type=bind" | |
], | |
"settings": { | |
"terminal.integrated.shell.linux": null | |
}, | |
"runArgs": ["--privileged"], | |
"extensions": ["dart-code.flutter"], | |
"workspaceMount": "source=${localWorkspaceFolder}/workspace,target=/home/developer/workspace,type=bind,consistency=delegated", | |
"workspaceFolder": "/home/developer/workspace" | |
} |
This file contains 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
FROM ubuntu:18.04 | |
# Prerequisites | |
RUN apt update && apt install -y curl git unzip xz-utils zip libglu1-mesa openjdk-8-jdk wget | |
# Set up new user | |
RUN useradd -ms /bin/bash developer | |
USER developer | |
WORKDIR /home/developer | |
# Prepare Android directories and system variables | |
RUN mkdir -p Android/sdk | |
ENV ANDROID_SDK_ROOT /home/developer/Android/sdk | |
RUN mkdir -p .android && touch .android/repositories.cfg | |
# Set up Android SDK | |
RUN wget -O sdk-tools.zip https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip | |
RUN unzip sdk-tools.zip && rm sdk-tools.zip | |
RUN mv tools Android/sdk/tools | |
RUN cd Android/sdk/tools/bin && yes | ./sdkmanager --licenses | |
RUN cd Android/sdk/tools/bin && ./sdkmanager "build-tools;29.0.2" "patcher;v4" "platform-tools" "platforms;android-29" "sources;android-29" | |
ENV PATH "$PATH:/home/developer/Android/sdk/platform-tools" | |
# Download Flutter SDK | |
RUN git clone https://github.com/flutter/flutter.git | |
ENV PATH "$PATH:/home/developer/flutter/bin" | |
# Run basic check to download Dark SDK | |
RUN flutter doctor |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment