Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Dockerfile to build dart container in small image **ONLY** x86_64 arch
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