-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
24 lines (19 loc) · 736 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Specify the Dart SDK base image version using dart:<version> (ex: dart:2.12)
FROM dart:stable AS build
# Resolve app dependencies.
WORKDIR /app
COPY pubspec.* ./
RUN dart pub get
# Copy app source code and AOT compile it.
COPY . .
# Ensure packages are still up-to-date if anything has changed
RUN dart pub get --offline
RUN dart compile exe bin/cbj_remote_pipes.dart -o bin/cbj_remote_pipes
# Build minimal serving image from AOT-compiled `/cbj_remote_pipes` and required system
# libraries and configuration files stored in `/runtime/` from the build stage.
FROM scratch
COPY --from=build /runtime/ /
COPY --from=build /app/bin/cbj_remote_pipes /app/bin/
# Start cbj_remote_pipes.
EXPOSE 50051
CMD ["/app/bin/cbj_remote_pipes"]