Rhash in a Docker image with enabled openssl based enhancements.
Rhash is a CLI utility for computing a wide variety of hashes and checksums. See more here.
Recommended way of usage:
function rhash {
local args=( $@ )
local file_path
for arg in ${args[@]}; do
if ! [[ "${arg}" =~ ^[-]|^[/] ]]; then
file_path="$(pwd)"
break
elif [[ "${arg}" =~ ^[/] ]]; then
file_path="$(printf '%s' "${arg%/*}")"
break
fi
done
docker run --rm -it --mount \
type=bind,source="${file_path}",target="${file_path}",readonly \
-w "${file_path}" akito13/rhash \
${args[@]}
}
Append the above function to your ~/.bashrc for example and activate it with source ~/.bashrc.
Now run the rhash command as you would always do:
rhash --uppercase --sha512 Dockerfile
Latest build:
docker pull akito13/rhash
Fixed version:
docker pull akito13/rhash:0.1.0
Tags follow semver, without the v.
Git tags equal Docker tags, so no need to check tags explicitly on Docker Hub.
Build yourself:
docker build -t akito-rhash:test -f Dockerfile .
Copyright (C) 2020 Akito [email protected]
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
Content type
Image
Digest
Size
3.1 MB
Last updated
over 6 years ago
docker pull akito13/rhash