1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-07-30 10:28:41 +00:00
hashcat/BUILD_Docker.md
Jens Steube b28fa54dc6 Add build Dockerfiles for binary compilation.
Compiles both Linux and Windows binaries.
Used to produce official releases for hashcat.net.
Includes Dockerfiles for Ubuntu 20.04 or Arch-based environments.
Supports optional user custom patches via docker/patches/.
2025-05-30 07:37:19 +02:00

41 lines
1.0 KiB
Markdown

# Compiling hashcat binaries with Docker
To build both Linux and Windows binaries in a clean and reproducible environment a dockerfile is available.
It is not considered to be used as a runtime OS.
### Building ###
```bash
docker build -f docker/BinaryPackage.ubuntu20 -t hashcat-binaries .
```
This will create a Docker image with all required toolchains and dependencies.
Optionally you can place custom *.patch or *.diff files into `patches/` folder. They will be applied before compiling.
### Output ###
The resulting output package will be located in: `/root/xy/hashcat-<version>.7z`.
You can copy it to your host with this command:
```bash
docker run --rm \
-e HOST_UID=$(id -u) \
-e HOST_GID=$(id -g) \
-v $(pwd):/out \
hashcat-binaries \
bash -c "cp /root/xy/hashcat-*.7z /out && chown \$HOST_UID:\$HOST_GID /out/hashcat-*.7z"
```
The package will be available on your host machine in the `out` directory.
### Debug ###
In case you want to play around in the docker, run:
```bash
docker run --rm -it hashcat-binaries /bin/bash
```