Skip to content

serversideup/docker-mkpasswd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Docker Images Logo

Build Status License Support us Discourse users Discord

Hi! We're Dan and Jay. We're a two person team with a passion for open source products. We created Server Side Up to help share what we learn.

Find us at:

  • 📖 Blog - get the latest guides and free courses on all things web/mobile development.
  • 🙋 Community - get friendly help from our community members.
  • 🤵‍♂️ Get Professional Help - get guaranteed responses within next business day.
  • 💻 GitHub - check out our other open source projects
  • 📫 Newsletter - skip the algorithms and get quality content right to your inbox
  • 🐥 Twitter - you can also follow Dan and Jay
  • ❤️ Sponsor Us - please consider sponsoring us so we can create more helpful resources

Our Sponsors

All of our software is free an open to the world. None of this can be brought to you without the financial backing of our sponsors.

Sponsors

Individual Supporters

alexjustesen  GeekDougle  

About this project

This repository contains the Dockerfile for the mkpasswd image. This image allows you to generate secure passwords using the mkpasswd command.

Available Docker Images

Use the latest tag to get the latest stable release of the image.

Docker Image Size

Usage

This Docker container allows you to generate passwords using mkpasswd from the whois package with customizable options.

Running the Container

You can run this Docker container directly using the command line. By default, it uses SHA-512 as the hashing method.

docker run --rm -it serversideup/mkpasswd

This command will output a salted hash which you can use directly.

Customizing Password Generation

Specifying a Method

To specify a different hashing method, you can provide the --method option followed by the method name.

docker run --rm -it serversideup/mkpasswd --method=md5crypt

Available methods

Method Name Hash
sha512crypt SHA-512
sha256crypt SHA-256
md5crypt MD5
descrypt standard 56 bit DES-based crypt(3)

You can always run the -m help command to view all available methods.

docker run --rm -it serversideup/mkpasswd -m help

Adding Salt

To add a specific salt, use the -S option followed by your desired salt value.

docker run --rm -it serversideup/mkpasswd --method=sha-512 -S mysalt

This command uses SHA-512 with a custom salt, enhancing the security of the generated hash.

Defaults

The default behavior without any additional arguments is to generate a salted hash using the SHA-512 method. If no specific salt is provided, mkpasswd automatically generates a random salt.

Examples

Here are some examples of how to use this Docker image:

  • Generate a default SHA-512 salted hash:

    docker run --rm -it serversideup/mkpasswd
  • Generate a hash using MD5 without a salt:

    docker run --rm -it serversideup/mkpasswd --method=md5crypt
  • Generate a hash using SHA-512 with a specified salt:

    docker run --rm -it serversideup/mkpasswd --method=sha-512 -S mysalt

These examples should help you get started with generating passwords securely using the Docker container.

Submitting issues and pull requests

Please feel free to open an issue or submit a pull request if you encounter any problems. We're always learning and open to suggestions.

Submit an issue

If you find a bug or issue, please submit an issue →

Submit a pull request

Since there are a lot of dependencies on these images, please understand that it can make it complicated on merging your pull request.

We'd love to have your help, but it might be best to explain your intentions first before contributing.

Report a security issue

If you find a critical security flaw, please open an issue or learn more about our responsible disclosure policy.

About

A simple and lightweight mkpasswd image based on Alpine. Great for generating password hashes.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project