diff --git a/pkg/dartdev/lib/src/templates/server_shelf.dart b/pkg/dartdev/lib/src/templates/server_shelf.dart index 919858b93d0..016de74a194 100644 --- a/pkg/dartdev/lib/src/templates/server_shelf.dart +++ b/pkg/dartdev/lib/src/templates/server_shelf.dart @@ -157,13 +157,13 @@ RUN dart pub get # Copy app source code (except anything in .dockerignore) and AOT compile app. COPY . . -RUN dart compile exe bin/server.dart -o bin/server +RUN dart build cli --target bin/server.dart -o output # 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/ +COPY --from=build /app/output/bundle/ /app/ # Start server. EXPOSE 8080