added docker file

This commit is contained in:
Vishal 2022-12-08 00:55:55 +05:30
parent e67026fa17
commit 529e4ce6ae
2 changed files with 38 additions and 3 deletions

27
Dockerfile Normal file
View File

@ -0,0 +1,27 @@
# file from: https://hub.docker.com/_/dart/
# run using
#docker build -t nostr_console .
#docker run -it nostr_console start
# Specify the Dart SDK base image version using dart:<version> (ex: dart:2.12)
FROM dart:stable AS build
RUN apt -y update && apt -y upgrade
# Resolve app dependencies.
WORKDIR /app
COPY pubspec.* ./
RUN dart pub get
COPY . .
RUN dart pub get --offline
RUN dart compile exe bin/nostr_console.dart -o bin/nostr_console
FROM scratch
COPY --from=build /runtime/ /
COPY --from=build /app/bin/nostr_console /app/bin/
ENTRYPOINT [ "/app/bin/nostr_console" ]
#CMD [ "yarn" ]

View File

@ -12,6 +12,14 @@ Nostr console client using Dart
# Running Nostr Console using Docker
```
docker build -t nostr_console .
```
Then run using
```
docker run -it nostr_console start
```
# Running Remotely Using Docker
@ -20,15 +28,15 @@ Use Nostr Terminal + Nostr Console to run Nostr Console remotely froma browser.
Build using
```
docker build -t nostr_console_image .
docker build -f Dockerfile.remote -t nostr_console_remote .
```
Then run using
```
docker run -it nostr_console_image start
docker run -it nostr_console_remote start
```
Do keep safety factors in mind.
Do keep security/privacy factors in mind. The link is basically a online backdoor into the local terminal.
# Use