mirror of
https://github.com/flutter/samples.git
synced 2025-11-09 22:38:42 +00:00
* code-sharing boilerplate * initial commit of code-sharing logic * documentation improvements * added code-sharing to samples.yaml * Updated counter UI to visually indicate communication with the server * added code_sharing to CI * CI changes to code_sharing * fixed test with DI * formatting * added shared module to CI * adds forgotten CI change
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"]
|