diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..31a5702d --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +node_modules +npm-debug.log +.github +tests diff --git a/.gitignore b/.gitignore index 40682646..e2e6ce46 100755 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ npm-debug.log travis.log build .vscode +.idea .*.swp src/core/config/modules/* src/core/config/OperationConfig.json diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..f906398c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +# build a small nginx image with built app +FROM nginx + +## Remove default nginx website +RUN rm -rf /usr/share/nginx/html/* + +## From 'build' directory copy website to default nginx public folder +COPY ./build/prod /usr/share/nginx/html + +EXPOSE 80 + +CMD ["nginx", "-g", "daemon off;"] diff --git a/README.md b/README.md index d79c99a9..b598a74a 100755 --- a/README.md +++ b/README.md @@ -21,6 +21,14 @@ Cryptographic operations in CyberChef should not be relied upon to provide secur [A live demo can be found here][1] - have fun! +## Quick start with docker-compose +``` +git clone https://github.com/gchq/CyberChef.git && cd CyberChef + +docker-compose up -d +``` + +open this address in your browser: _http://localhost:8080/_ ## How it works diff --git a/buildDocker.sh b/buildDocker.sh new file mode 100644 index 00000000..9d2d1219 --- /dev/null +++ b/buildDocker.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +# build latest image +grunt prod + +docker build -t loopsun/cyberchef:latest . + +docker push loopsun/cyberchef:latest diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..7fd1cfe9 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,8 @@ +version: '2.0' + +services: + cyberchef: + restart: always + image: loopsun/cyberchef:latest + ports: + - 8080:80