working docker file

This commit is contained in:
Vishal 2022-11-16 15:59:09 +05:30
parent 128841d067
commit fa676a3d7d
2 changed files with 18 additions and 5 deletions

View File

@ -13,15 +13,13 @@ RUN dart pub get
COPY . .
# Ensure packages are still up-to-date if anything has changed
RUN dart pub get --offline
RUN dart compile exe bin/helloworld.dart -o bin/helloworld
RUN dart compile exe bin/nostr_console.dart -o bin/nostr_console
# Build minimal serving image from AOT-compiled `/server` 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/helloworld /app/bin/
COPY --from=build /app/bin/nostr_console /app/bin/
CMD ["/app/bin/helloworld"]
# CMD ["dart run /app/bin/nostr_console.dart "]
CMD ["/app/bin/nostr_console"]

View File

@ -11,6 +11,20 @@ Nostr console client using Dart
* build appimage for linux use
# Docker
Build using
```
docker build -t nostr_console_image .
```
Then run using
```
docker run -it nostr_console_image .
```
# Use
Easiest way to run nostr_console: Go to releases and get an executable for your platform.
@ -22,6 +36,7 @@ Otherwise do following:
4. Run command ```dart run bin/nostr_console.dart```, which will run it with default settings.
5. Further you can create an executable for your platform by ```dart compile exe bin/nostr_console.dart``` which will create an executable for your platform. You can invoke that exe with required parameters. On Windows, you can create a shortcut to it with your desired command line arguments mentioned in it.
Usage:
```