-
-
Save dipendra-sharma/6c0348f262b0040d6f81757cb4e28c83 to your computer and use it in GitHub Desktop.
Dockerfile to build dart container in small image **ONLY** x86_64 arch
This file contains hidden or 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 dart-runtime | |
WORKDIR /app | |
ADD pubspec.* /app/ | |
RUN pub get | |
ADD bin /app/bin/ | |
RUN pub get --offline | |
RUN dart2native /app/bin/server.dart -o /app/server | |
FROM frolvlad/alpine-glibc | |
COPY --from=dart-runtime /app/server /server | |
CMD [] | |
ENTRYPOINT ["/server"] | |
EXPOSE 8080 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment