Files
cinema-display/server/cinema/Dockerfile
Peter Siegmund 8f51ac8b24
Some checks failed
Build and Push Multi-Arch Docker Image / build-and-push (push) Failing after 1m46s
try gitea actions for dart server
Signed-off-by: Peter Siegmund <developer@mars3142.org>
2025-11-21 21:02:10 +01:00

25 lines
667 B
Docker

# Use latest stable channel SDK.
FROM dart:3.10.1 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 APP_VERSION=$(awk '/^version:/{print $2}' pubspec.yaml) && \
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 /
# Start server.
EXPOSE 3000
CMD ["/app/bin/server"]