Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Author: Kunush
FROM node:13.5.0-alpine3.10
# copy the local folder to the image
COPY websheep /websheep
# run build
RUN cd /websheep && yarn install
# change to websheep directory
WORKDIR /websheep
# expose websheep ports [3333: web service, 4200: web interface, 7777: debugging ws]
EXPOSE 4200
EXPOSE 3333
EXPOSE 7777
ENTRYPOINT ["yarn", "start"]
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,24 @@ Install [Node](https://nodejs.org/en/download/) & [Yarn](https://classic.yarnpkg
yarn install
yarn start
```
# Running websheeb using docker

1. Download the repository as a zip file
2. Unzip to a folder and rename it to websheep
3. Copy the Dockerfile outside websheep so your directory structure will look like
```
$ ls -l
total 8
-rw-r--r-- 1 kali kali 177 Oct 19 09:55 Dockerfile
drwxr-xr-x 8 kali kali 4096 Oct 19 09:48 websheep
```
4. Building a docker image
```
sudo docker build -t mysheep .
```
5. Upon successful image build run the container
```
sudo docker run --rm -d --name sheep_container -p 4200:4200 -p 3333:3333 mysheep
```
6. Open your browser and navigate to localhost:4200 for the web interface or localhost:3333 for the api testing interface.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"nx": "nx",
"postinstall": "ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points",
"start": "run-p start:*",
"start:websheep": "ng serve websheep",
"start:websheep-api": "ng serve websheep-api",
"start:websheep": "ng serve websheep --host 0.0.0.0",
"start:websheep-api": "ng serve websheep-api --host 0.0.0.0",
"build": "yarn run build:websheep-api:prod",
"build:websheep": "ng build websheep",
"build:websheep:prod": "ng build websheep --prod",
Expand Down