This repository is for building a Docker container with GCHQ's CyberChef.
4nxio/cyberchef:<cyberchef-version>
Version
Architecture:
amd64
for most desktop computers (e.g. x86_64)
Distribution:
alpine
for alpine latest
The following describes the best practice use of the container and the usage.
The recommended mechanism to use persistent data are Docker volumes
because they depend on the directory structure of the host machine and can be used the same way on every platform. So you need to create the volumes on your host:
docker volume create cyberchef-nginx
docker volume create cyberchef-ssl
docker volume create cyberchef-logs
You can start a container with a prebuild image or by building it on your own.
Directly via command line use the following:
docker run \
--name cyberchef \
-p 8080:80 \
-d \
--restart=always \
-v "cyberchef-nginx:/etc/nginx" \
-v "cyberchef-ssl:/etc/ssl" \
-v "cyberchef-logs:/var/log/nginx" \
4nxio/cyberchef:latest
Create the following docker-compose.yml
:
version: '3'
services:
cyberchef:
image: "4nxio/cyberchef:latest"
restart: always
ports:
- "8080:80"
volumes:
- "cyberchef-nginx:/etc/nginx"
- "cyberchef-ssl:/etc/ssl"
- "cyberchef-logs:/var/log/nginx"
volumes:
cyberchef-nginx:
external: true
cyberchef-ssl:
external: true
cyberchef-logs:
external: true
You can start the container via docker-compose up -d
. It will be started via the automated build image on Docker Hub.
You can connect to a console of an already running cyberchef container with the following command:
docker ps
- lists all your currently running containerdocker exec -it cyberchef /bin/sh
- connect to cyberchef container by namedocker logs cyberchef
- gives you the output of the cyberchef container while starting
There is the possibility to configure the nginx webserver via environment variables which can be set directly from the command line, docker compose file or an extra environment file. The recommended way is to use an environment file.
Just have a look here and download the file.
You can use the environment file via command line with:
docker run \
--name cyberchef \
-p 8080:80 \
--env-file environment.conf \
-d \
--restart=always \
-v "cyberchef-nginx:/etc/nginx" \
-v "cyberchef-ssl:/etc/ssl" \
-v "cyberchef-logs:/var/log/nginx" \
4nxio/cyberchef:latest
Just create the following docker-compose.yml
or extend your existing one:
version: '3'
services:
cyberchef:
image: "4nxio/cyberchef:latest"
restart: always
env_file:
- environment.conf
ports:
- "8080:80"
volumes:
- "cyberchef-nginx:/etc/nginx"
- "cyberchef-ssl:/etc/ssl"
- "cyberchef-logs:/var/log/nginx"
volumes:
cyberchef-nginx:
external: true
cyberchef-ssl:
external: true
cyberchef-logs:
external: true
You can build the image by yourself via command line or docker compose.
Checkout the github repository and then run those command:
$ docker build -t 4nxio/cyberchef:latest .
Check out the Dockerfile, docker-entrypoint.sh and optional the environment.conf. After this create the following docker-compose.yml
:
version: '3'
services:
cyberchef:
build: .
restart: always
ports:
- 8080:80
volumes:
- "cyberchef-nginx:/etc/nginx"
- "cyberchef-ssl:/etc/ssl"
- "cyberchef-logs:/var/log/nginx"
volumes:
cyberchef-nginx:
external: true
cyberchef-ssl:
external: true
cyberchef-logs:
external: true
It will also be started via docker-compose up -d
. Be advised that it will be build only the first time. If you want to build it again later on use the command docker-compose build
or docker-compose up --build
. You can check that the container is running via docker-compose ps
, stop the container with docker-compose stop
and remove the container with docker-compose rm
.
Contribution to this project is welcome. Please feel free to fork and and start pull requests.