From e574c7ccc15fa1a927dfb9035f5ad733a8bde76c Mon Sep 17 00:00:00 2001 From: "Kyle J. Davis" Date: Wed, 8 Nov 2023 09:51:16 -0700 Subject: [PATCH 1/5] adds dockerfile for tuftool --- tuftool/Dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 tuftool/Dockerfile diff --git a/tuftool/Dockerfile b/tuftool/Dockerfile new file mode 100644 index 00000000..bfd8d1ac --- /dev/null +++ b/tuftool/Dockerfile @@ -0,0 +1,7 @@ +# syntax=docker/dockerfile:1 + +FROM rust:slim +RUN apt update && apt install -y openssl +RUN cargo install --force tuftool +RUN mkdir /share +ENTRYPOINT ["tuftool"] From 59628d6fa4a07564e74597f27bb62675c267d43c Mon Sep 17 00:00:00 2001 From: "Kyle J. Davis" Date: Wed, 8 Nov 2023 10:01:21 -0700 Subject: [PATCH 2/5] adds readme for container --- CONTRIBUTING.md | 1 - tuftool/README.md | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5a82b98b..fb7eedaf 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,7 +6,6 @@ documentation, we greatly value feedback and contributions from our community. Please read through this document before submitting any issues or pull requests to ensure we have all the necessary information to effectively respond to your bug report or contribution. - ## Security issue notifications If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue. diff --git a/tuftool/README.md b/tuftool/README.md index 068db3ff..e9a5a3be 100644 --- a/tuftool/README.md +++ b/tuftool/README.md @@ -135,6 +135,24 @@ tuftool download \ `tuftool` respects the `HTTPS_PROXY` and `NO_PROXY` environment variables. +## Container + +You can build a simple container image to avoid needing to install the Rust toolchain and dependencies or your local machine. + +To build the image run use Docker or Finch (same argument syntax, just replace `finch` for `docker`): + +```shell +finch build -t tuftool . +``` + +To use tuftool, mount the host working directory to `/share`. + +For example, to mount the current directory for `download` you would do something like: + +```shell +finch run -it -v $(pwd):/share tuftool download "/share/some_directory" ... +``` + ## Testing Unit tests are run in the usual manner: `cargo test`. From c72202dbce34729d2d62b2cd27b9940099b8498d Mon Sep 17 00:00:00 2001 From: "Kyle J. Davis" Date: Wed, 8 Nov 2023 12:30:34 -0700 Subject: [PATCH 3/5] Update tuftool/README.md Co-authored-by: Matthew James Briggs --- tuftool/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tuftool/README.md b/tuftool/README.md index e9a5a3be..59d8ad91 100644 --- a/tuftool/README.md +++ b/tuftool/README.md @@ -142,7 +142,8 @@ You can build a simple container image to avoid needing to install the Rust tool To build the image run use Docker or Finch (same argument syntax, just replace `finch` for `docker`): ```shell -finch build -t tuftool . +cd finch +docker build -t tuftool . ``` To use tuftool, mount the host working directory to `/share`. From a46e758c4d5e417de5a91751e1ea3e8fe7d80ee3 Mon Sep 17 00:00:00 2001 From: "Kyle J. Davis" Date: Wed, 8 Nov 2023 12:30:41 -0700 Subject: [PATCH 4/5] Update tuftool/README.md Co-authored-by: Matthew James Briggs --- tuftool/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tuftool/README.md b/tuftool/README.md index 59d8ad91..637a5b3e 100644 --- a/tuftool/README.md +++ b/tuftool/README.md @@ -151,7 +151,7 @@ To use tuftool, mount the host working directory to `/share`. For example, to mount the current directory for `download` you would do something like: ```shell -finch run -it -v $(pwd):/share tuftool download "/share/some_directory" ... +docker run -it -v $(pwd):/share tuftool download "/share/some_directory" ... ``` ## Testing From 1868304adbf1f432c48ec46ef9832d5ffdb23e4b Mon Sep 17 00:00:00 2001 From: "Kyle J. Davis" Date: Wed, 15 Nov 2023 14:13:47 -0700 Subject: [PATCH 5/5] Add --locked and fixes references to finch --- tuftool/Dockerfile | 2 +- tuftool/README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tuftool/Dockerfile b/tuftool/Dockerfile index bfd8d1ac..601af6d8 100644 --- a/tuftool/Dockerfile +++ b/tuftool/Dockerfile @@ -2,6 +2,6 @@ FROM rust:slim RUN apt update && apt install -y openssl -RUN cargo install --force tuftool +RUN cargo install --force --locked tuftool RUN mkdir /share ENTRYPOINT ["tuftool"] diff --git a/tuftool/README.md b/tuftool/README.md index 637a5b3e..372595b6 100644 --- a/tuftool/README.md +++ b/tuftool/README.md @@ -139,10 +139,10 @@ tuftool download \ You can build a simple container image to avoid needing to install the Rust toolchain and dependencies or your local machine. -To build the image run use Docker or Finch (same argument syntax, just replace `finch` for `docker`): +To build the image use Docker or Finch (same argument syntax, just replace +`docker` for `finch`): ```shell -cd finch docker build -t tuftool . ```