-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdart.Dockerfile
37 lines (29 loc) · 1.1 KB
/
dart.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
36
37
# pass in image name as a build argument like this:
# docker build --build-arg IMAGE_NAME=nateateteen/zshpod:latest -f dart.Dockerfile .
ARG IMAGE_NAME
FROM $IMAGE_NAME
ARG _USER="gitpod"
# sets user to root so that we can install stuff
USER root
# install dart
RUN apt-get update && \
apt-get install -y --no-install-recommends gnupg2 curl git ca-certificates apt-transport-https openssh-client && \
curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list && \
apt-get update && \
apt-get install -y --no-install-recommends dart && \
apt-get clean -y && \
rm -rf \
/var/cache/debconf/* \
/var/lib/apt/lists/* \
/tmp/* \
/var/tmp/*
# sets path
ENV PATH="$PATH:/usr/lib/dart/bin"
WORKDIR /home/$_USER/.dart
# copies dart config files
ADD .dart_config/ .
# sets user back to gitpod
USER $_USER
RUN dart --disable-analytics && \
echo "\ndart-tool=$(date '+%Y-%m-%d'),1" >> ~/.dart-tool/dart-flutter-telemetry.config