diff --git a/Dockerfile b/Dockerfile index 33ac38e..46bcb59 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,12 +7,19 @@ RUN dart pub get COPY . /app RUN dart pub get --offline -FROM build as dev +FROM build AS dev CMD [ "dart", "run", "bin/running_on_dart.dart" ] -FROM build as prod +FROM build AS build_prod RUN dart run nyxx_commands:compile bin/running_on_dart.dart -o bot -CMD [ "./bot.exe" ] \ No newline at end of file +FROM scratch AS prod + +WORKDIR /app + +COPY --from=build_prod /runtime / +COPY --from=build_prod /app/** /app + +CMD [ "./bot.exe" ]