Files
cinema-display/server/cinema/Dockerfile
Peter Siegmund 4ca90e327f
All checks were successful
Build and Push Multi-Arch Docker Image / build-and-push (push) Successful in 11m23s
try new container build
Signed-off-by: Peter Siegmund <developer@mars3142.org>
2025-11-28 21:15:23 +01:00

26 lines
749 B
Docker

# Use latest stable channel SDK.
FROM dart:stable AS build
# Resolve app dependencies.
WORKDIR /app
COPY pubspec.* ./
RUN dart pub get
# Copy app source code (except anything in .dockerignore) and AOT compile app.
COPY . .
RUN dart run build_runner build --delete-conflicting-outputs && \
APP_VERSION=$(grep 'version:' pubspec.yaml | sed 's/version: //') && \
dart compile exe bin/server.dart -o bin/server \
-DAPP_VERSION=$APP_VERSION
# 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 assets /assets
# Start server.
EXPOSE 3000
CMD ["/app/bin/server"]