Skip to content

Commit 437fc66

Browse files
authored
Merge pull request htr-tech#42 from MoisesTapia/Docker
zphihher in Docker Released !!
2 parents d9ba6dd + 1073de9 commit 437fc66

File tree

4 files changed

+116
-2
lines changed

4 files changed

+116
-2
lines changed

Docker/README.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Run ZPhiSher in Docker Compose
2+
3+
![docker](https://img.shields.io/badge/Docker-v19.03.12-blue?style=plastic&logo=docker)
4+
![dockercompose](https://img.shields.io/badge/Docker_Compose-v1.25.4-orange?style=plastic&logo=docker)
5+
![Maintainer](https://img.shields.io/badge/Maintainer-Equinockx-success?style=plastic&logo=terraform)
6+
7+
8+
## Runnin within container
9+
10+
11+
## Requeriments
12+
13+
- [X] Docker
14+
- [X] docker-compose
15+
16+
## Usage Mode
17+
18+
Clone the repo from Github
19+
```bash
20+
git clone https://github.com/htr-tech/zphisher
21+
cd zpshisher
22+
```
23+
24+
Run docker-compose
25+
26+
```bash
27+
docker-compose up --build -d
28+
```
29+
'_Don not need redirection of ports 'cause the container is exposed to internet_' <br>
30+
Verify of the container is running with:
31+
32+
```bash
33+
equinockx~$ docker-compose ps
34+
35+
Name Command State Ports
36+
-------------------------------------------
37+
zphisher bash zphisher.sh Up
38+
39+
```
40+
41+
42+
Executing zphisher inside of container
43+
44+
```bash
45+
docker-compose exec zphisher bash zphisher.sh
46+
```
47+
48+
## Persist Data
49+
50+
When we make or buils the service with `docker-compose up --build -d` this persist the data templates in the same folder `websites`.
51+
If you add the new Template in `websites` this will be reflected in the container and you can use it.
52+
53+
- [X] `equinockx~/websites$`
54+
- [X] websites
55+
56+
## First Start the services
57+
58+
```bash
59+
docker-compose up --build -d
60+
```
61+
## Down the container
62+
```bash
63+
docker-compose down
64+
```
65+
## Stop the services
66+
67+
```bash
68+
docker-compose stop
69+
```
70+
## Start the services
71+
72+
With this command docker-compose will initialize the service stopped
73+
74+
```bash
75+
docker-compose start
76+
```
77+
78+
79+

Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM debian:10
2+
LABEL MAINTAINER="Equinockx moisestapia741@gmail.com"
3+
4+
WORKDIR /home/
5+
6+
COPY . /home/
7+
8+
RUN apt-get update && \
9+
apt-get install -y --no-install-recommends openssh-server && \
10+
apt-get install -y curl && \
11+
apt-get install --no-install-recommends -y php && \
12+
apt-get install -y unzip && \
13+
apt-get clean && \
14+
rm -rf /var/lib/apt/lists/*

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@
2020
## Installation :
2121

2222
* `apt update`
23-
* `apt install git curl php openssh -y`
23+
* `apt install git curl php openssh-server -y`
2424
* `git clone git://github.com/htr-tech/zphisher.git`
2525
* `cd zphisher`
2626
#### > Run : `bash zphisher.sh`
2727

2828
## Single Command :
2929
```
30-
apt update ; apt install git curl php openssh -y ; git clone git://github.com/htr-tech/zphisher.git ; cd zphisher ; bash zphisher.sh
30+
apt update ; apt install git curl php openssh-server -y ; git clone git://github.com/htr-tech/zphisher.git ; cd zphisher ; bash zphisher.sh
3131
```
3232
<br>
3333
<p align="center">

docker-compose.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
version: '3.7'
2+
3+
networks:
4+
internet:
5+
driver: bridge
6+
7+
services:
8+
9+
zphisher:
10+
11+
container_name: zphisher
12+
build: .
13+
image: zphisher:v0.1
14+
command: bash zphisher.sh
15+
stdin_open: true
16+
tty: true
17+
volumes:
18+
- $PWD/websites:/home/websites
19+
networks:
20+
- internet
21+
restart: always

0 commit comments

Comments
 (0)