Created
July 6, 2019 11:28
-
-
Save renatoathaydes/10598c963ba10e48501795e8e1bdf2b1 to your computer and use it in GitHub Desktop.
Minimalistic Docker image from a simple Dart application - includes only the AOT-compiled app and dartaotruntime.
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 google/dart AS dartc | |
WORKDIR /app | |
ADD pubspec.* /app/ | |
RUN pub get | |
ADD bin/ /app/bin/ | |
ADD lib/ /app/lib/ | |
RUN pub get --offline | |
RUN dart2aot /app/bin/main.dart /app/main.aot | |
FROM bitnami/minideb | |
COPY --from=dartc /app/main.aot /main.aot | |
COPY --from=dartc /usr/lib/dart/bin/dartaotruntime /dartaotruntime | |
CMD [] | |
ENTRYPOINT ["/dartaotruntime", "/main.aot"] |
Most likely yes, try it to be sure.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can we use alpine as base image?