mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 13:58:47 +00:00
* Revert "Revert "Add code sharing sample (#1444)" (#1464)"
This reverts commit dc50c46ef1.
* Opting out failing tests on Windows for CI
Co-authored-by: Craig Labenz <craig.labenz@gmail.com>
21 lines
477 B
Docker
21 lines
477 B
Docker
# Use latest stable channel SDK.
|
|
FROM dart:stable AS build
|
|
|
|
# Resolve app dependencies.
|
|
WORKDIR /app
|
|
COPY . .
|
|
RUN dart pub get
|
|
|
|
# AOT compile app.
|
|
RUN dart compile exe bin/server.dart -o bin/server
|
|
|
|
# Build minimal serving image from AOT-compiled `/server`
|
|
# and the pre-built AOT-runtime in the `/runtime/` directory of the base image.
|
|
FROM scratch
|
|
COPY --from=build /runtime/ /
|
|
COPY --from=build /app/bin/server /app/bin/
|
|
|
|
# Start server.
|
|
EXPOSE 8080
|
|
CMD ["/app/bin/server"]
|