Feature: added docker support

This commit is contained in:
loopsun 2019-10-09 11:55:41 +08:00
parent 06708949a1
commit 52d9c51e69
6 changed files with 41 additions and 0 deletions

4
.dockerignore Normal file
View file

@ -0,0 +1,4 @@
node_modules
npm-debug.log
.github
tests

1
.gitignore vendored
View file

@ -3,6 +3,7 @@ npm-debug.log
travis.log travis.log
build build
.vscode .vscode
idea
.*.swp .*.swp
.DS_Store .DS_Store
src/core/config/modules/* src/core/config/modules/*

12
Dockerfile Normal file
View file

@ -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' copy website to default nginx public folder
COPY ./build/prod /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

View file

@ -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! [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 ## How it works

8
buildDocker.sh Executable file
View file

@ -0,0 +1,8 @@
#!/usr/bin/env bash
# build latest image
grunt prod
docker build -t loopsun/cyberchef:latest .
docker push loopsun/cyberchef:latest

8
docker-compose.yml Normal file
View file

@ -0,0 +1,8 @@
version: '2.0'
services:
cyberchef:
restart: always
image: loopsun/cyberchef:latest
ports:
- 8080:80