bcrypt-tool on BusyBox to hash passwords and check bcrypt hashes - amd64 and arm64, rebuilt weekly
10K+
This Docker image is managed and kept up to date by epicsoft LLC.
bcrypt-tool by Seth Hoenig in a small BusyBox image: hash a password with bcrypt, check whether a password matches a hash, and read the cost of a hash - for seeding users into a database or a config file, or for checking a hash you found there, without installing anything on the host.
linux/amd64 and linux/arm64The image is rebuilt weekly with the newest release of bcrypt-tool, the current BusyBox image and the current Go toolchain.
| Tag | Holds |
|---|---|
latest | the newest bcrypt-tool release |
1 | the newest 1.x release; once upstream releases 2.0, it keeps the last 1.x build |
1.1.11 | exactly this release; rebuilt weekly while it is the newest one, then kept as it is |
The bcrypt-tool version an image holds is written into its labels:
docker image inspect --format '{{index .Config.Labels "image.bcrypt-tool.version"}}' epicsoft/bcrypt:1
The image runs bcrypt directly - the action and its arguments follow the image name:
hash [password] <cost> hash the password; cost 4-31, default 10
match [password] [hash] print "yes" and exit 0 if the password matches the hash, "no" and exit 1 otherwise
cost [hash] print the cost of the hash
Without an action the image prints this help and exits with 2, as it does on wrong arguments.
docker run --rm epicsoft/bcrypt:1 hash 'p4ssw0rd' 12
$2a$12$ft/vurFX2/51HBJQYe5I2uwCsofwMJgyC9fFI93Gm2fn0Kiaj1mbu
Put the hash in single quotes - otherwise the shell takes its $ signs for variables.
docker run --rm epicsoft/bcrypt:1 match 'p4ssw0rd' '$2a$12$ft/vurFX2/51HBJQYe5I2uwCsofwMJgyC9fFI93Gm2fn0Kiaj1mbu'
yes
docker run --rm epicsoft/bcrypt:1 cost '$2a$12$ft/vurFX2/51HBJQYe5I2uwCsofwMJgyC9fFI93Gm2fn0Kiaj1mbu'
12
bcrypt: password length exceeds 72 bytes, exit 2): bcrypt only
reads the first 72 bytes, and the tool says so instead of cutting the password without notice.read -rs PW in bash, and pass "$PW".gophers.dev/cmds/bcrypt-tool, which never got newer releases. The hashes stay compatible - same $2a$ format,
same costs - apart from the 72-byte limit above.gitlab.com/epicdocker/bcrypt to gitlab.com/epicsoft-networks/bcrypt;
registry.gitlab.com/epicdocker/bcrypt is gone. Docker Hub epicsoft/bcrypt stays as it is.Issues are welcome on GitLab and GitHub. Please report a security problem as a confidential issue on GitLab instead of a public one.
MIT — Copyright (c) 2017-2026 epicsoft LLC / Alexander Schwarz
The MIT license applies only to files created by epicsoft LLC. Third-party software in the image — bcrypt-tool and BusyBox — remains under its own licenses.
Content type
Image
Digest
sha256:23478ffbf…
Size
2.9 MB
Last updated
1 day ago
docker pull epicsoft/bcrypt