-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
35 lines (26 loc) · 918 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#
# Created by Jugal Kishore --- 2020
#
# Android SDK with Flutter
#
# Base Image: crazyuploader/android_sdk:latest
FROM crazyuploader/android_sdk:latest
# Setting Non-Interactive Build Time Environment Variable
ARG DEBIAN_FRONTEND=noninteractive
# Setting TERM Environment Variable
ENV TERM=xterm-256color
# Environment Variables
ENV FLUTTER_HOME=/opt/flutter
ENV PATH=${PATH}:${FLUTTER_HOME}/bin
# Getting Flutter stable from GitHub source https://github.com/flutter/flutter.git
RUN git clone --depth=1 https://github.com/flutter/flutter.git -b stable ${FLUTTER_HOME}
# Create a new non-root user
RUN useradd -m -s /bin/bash worker
# Change the ownership of the /opt/android-sdk & /opt/flutter directory
RUN chown -R worker:worker /opt/android-sdk && \
chown -R worker:worker ${FLUTTER_HOME}
# Set the new user as the active user
USER worker
# Run flutter doctor command
RUN flutter doctor
CMD ["bash"]