Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ardriveapp/ardrive-cli-docker
Contains Dockerfile and all CI-related tooling to build a Docker image for the ArDrive CLI
https://github.com/ardriveapp/ardrive-cli-docker
Last synced: 3 days ago
JSON representation
Contains Dockerfile and all CI-related tooling to build a Docker image for the ArDrive CLI
- Host: GitHub
- URL: https://github.com/ardriveapp/ardrive-cli-docker
- Owner: ardriveapp
- License: mit
- Created: 2021-11-05T17:54:01.000Z (about 3 years ago)
- Default Branch: production
- Last Pushed: 2022-04-12T18:13:28.000Z (over 2 years ago)
- Last Synced: 2023-03-04T04:17:57.086Z (over 1 year ago)
- Language: Shell
- Size: 3.91 KB
- Stars: 2
- Watchers: 7
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ardrive Cli Docker
Contains Dockerfile and all CI-related tooling to build a Docker image for the ArDrive CLI.Knowledge on how to set-up Docker is expected.
Password for both root and node user inside the Docker is "ardrive"
## Intended Audience
This tool is intended for use by:ArDrive power users with advanced workflows and automation in mind: bulk uploaders, those with a larger storage demand, developers, nft creators, storage/db admins, etc.
Automated workflows
Services
#### CLI tools build-in
git
jq
sudo
vim
## Build image
On repo root:
``docker build . -t ardrive-cli:latest``
## Run Ardrive-CLI docker
The suggested way to run the image is with the following command``docker run --name ardrive --rm --init -it --mount type=tmpfs,destination=/home/node/tmp ardrive-cli``
#### Explanation
``--name ardrive-cli`` name we assign to CLI Docker. In this case "ardrive-cli"
``--rm`` Docker will not persist once stopped.
``--init`` Enforces an init process as PID 1.
``--it`` Interactive and with a TTY.
``--mount type=tmpfs,destination=/home/node/tmp`` Temporary in-memory file system that we use to store a wallet safely
### Build a specific branch
We proportionate the branch with an ENV variable at run. e.g. to build dev branch ``-e BRANCH='dev'``
Sample command:
``docker run --name ardrive --rm --init -it -e BRANCH='dev' --mount type=tmpfs,destination=/home/node/tmp ardrive-cli``
Environment variables that control the build process:
``-e NO_SETUP=1 `` skips cloning and building
``-e NO_AUTOBUILD=1 `` skips building process
## Interact with a wallet
### Put wallet inside your container
To copy our wallet inside Docker, we just need the following command.
Image was intended to work with only ONE wallet at a time.Running the below command a 2nd time will overwrite the 1st wallet.
``docker exec -i ardrive sh -c 'cat > /home/node/tmp/wallet.json' < [path to my wallet file]``
Bear in mind that with this method, Wallet file is never written to host system.
### Wallet Operations
There is a $WALLET variable directly pointing to /home/node/tmp/wallet.json inside the Docker.
In order to run any command that requires a wallet you could just replace its path with $WALLET
e.g. for a private file
``yarn ardrive file-info -f [file-id] -w $WALLET -p [my-unsafe-password]``
## Uploading files
In order to upload stuff, you need to load your files into the container.
Sample command:
``docker cp [file-or-folder-path] ardrive:home/node/uploads``