Sign inSign up

akito13/rhash

By akito13

•Updated over 6 years ago

Image
0

397

akito13/rhash repository overview

Docker Cloud Build Status Docker Image Version (latest semver)

Docker Stars Docker Pulls

Docker Image Size (latest semver) Docker Cloud Automated build

Upstream

GitHub Liberapay patrons

⁠What

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⁠.

⁠Why

  • Use the brand newest version of rhash without any library version trouble.
  • You don't need to trouble yourself with compilation yourself, the Dockerfile will take care of it.
  • Due to the alpine base image, this image is super small.
  • If you follow below recommendation of how to use this image, then you will automatically always use the newest version of rhash.

⁠How

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

⁠Get

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

Build yourself:

docker build -t akito-rhash:test -f Dockerfile .

⁠License

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/⁠.

Tag summary

Content type

Image

Digest

Size

3.1 MB

Last updated

over 6 years ago

docker pull akito13/rhash