From 9eabff8f4312042ef66734a7e9ba81b6eab50eaf Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Mon, 6 Jan 2025 20:10:28 -0800 Subject: [PATCH] Add directions to run within a Docker container --- Dockerfile | 4 ++++ README.md | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e9adbc5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,4 @@ +FROM denoland/deno:alpine-2.1.4 +USER deno +COPY main.ts . +CMD ["run", "main.ts"] \ No newline at end of file diff --git a/README.md b/README.md index facd3fa..cec4ba1 100644 --- a/README.md +++ b/README.md @@ -103,3 +103,19 @@ deno test --lock `main.ts` does not have any dependencies, so `deno.lock` has no effect on the main CLI. + +## Docker container + +For additional security, you can run this CLI within a Docker container. + +1. Build the Docker image using the provided `Dockerfile`: + +``` +docker build -t spt . +``` + +2. Create a new container without network access and run the CLI: + +``` +docker run -it --rm --network none spt +``` -- 2.47.3