-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
30 lines (20 loc) · 875 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
# Install dependencies:
FROM dart:2.14.4 as dart-runtime
WORKDIR /app
# TODO: RUN git clone --depth 1 --branch <version released with https://github.com/wrike/dart-code-metrics/pull/177> https://github.com/wrike/dart-code-metrics.git /app
RUN git clone --depth 1 --branch 4.16.0 https://github.com/dart-code-checker/dart-code-metrics.git /app
RUN pub get
RUN dart compile exe /app/bin/metrics.dart -o /app/metrics
# Install engine:
FROM bitnami/minideb
WORKDIR /usr/src/app/
COPY engine.json /
COPY --from=dart-runtime /app/metrics bin/metrics
# --sdk-path requirement
# https://github.com/dart-code-checker/dart-code-metrics/issues/385
COPY --from=dart-runtime /usr/lib/dart/ /usr/lib/dart/
RUN adduser -u 9000 --disabled-password app
USER app
VOLUME /code
WORKDIR /code
CMD ["/usr/src/app/bin/metrics", "--sdk-path=/usr/lib/dart", "--reporter=codeclimate", "./"]