Files
dde_gesture_manager/api/Dockerfile
T

18 lines
475 B
Docker
Raw Normal View History

2022-01-11 18:54:55 +08:00
FROM dart:stable AS build-env
LABEL stage=dart_builder
ENV PUB_HOSTED_URL="https://pub.flutter-io.cn"
ENV ANGEL_ENV=production
2021-12-17 18:24:32 +08:00
COPY ./ ./
RUN pub get
2022-01-11 18:54:55 +08:00
RUN dart compile exe bin/prod.dart -o /server
ENTRYPOINT ["dart", "bin/migrate.dart", "up"]
2021-12-17 18:24:32 +08:00
2022-01-11 18:54:55 +08:00
FROM scratch
WORKDIR /app
2021-12-17 18:24:32 +08:00
ENV ANGEL_ENV=production
2022-01-11 18:54:55 +08:00
ADD ./views ./views
ADD ./config ./config
COPY --from=build-env /runtime/ /
COPY --from=build-env /server /app
2021-12-17 18:24:32 +08:00
EXPOSE 3000
2022-01-11 18:54:55 +08:00
ENTRYPOINT ["./server", "-a", "0.0.0.0", "--port", "3000"]