[current results] Migrate current results server to official Docker image

The server will now be compiled to an executable, and deployed with
just the needed runtime support files.

Change-Id: I818f229f6ed02df6ae2ee19378436a721441c748
Reviewed-on: https://dart-review.googlesource.com/c/dart_ci/+/246446
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
diff --git a/current_results/.dockerignore b/current_results/.dockerignore
new file mode 100644
index 0000000..21504f8
--- /dev/null
+++ b/current_results/.dockerignore
@@ -0,0 +1,9 @@
diff --git a/current_results/Dockerfile b/current_results/Dockerfile
index b951797..c333dee 100644
--- a/current_results/Dockerfile
+++ b/current_results/Dockerfile
@@ -1 +1,21 @@
-FROM google/dart-runtime
+# Use latest stable channel SDK.
+FROM dart:stable AS build
+# Resolve app dependencies.
+COPY pubspec.* ./
+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
+# 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"]