File tree Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Original file line number Diff line number Diff line change
1
+ # Image construction
2
+
3
+ ``` bash
4
+ cd build
5
+ docker build . -t php_backend_dev
6
+ ```
7
+
8
+ # Image launch
9
+ Go to the parent directory
10
+ ``` bash
11
+ cd ..
12
+ docker run -d --rm -p 8080:80 -p 8000:8000 --name backend -v %CD%/volume:/volume --ip 192.168.33.225 php_backend_dev
13
+ ```
14
+ ** docker run** to create virtualization of the image.
15
+ ** -d** For stdout output.
16
+ ** --rm** delete the container when the virtualization is finished.
17
+ ** -p** real port corresponds to the virtual port. realport: virtuelport
18
+ ** --name** Name of virtualization to start or stop.
19
+ ** -v** Real folder corresponds to the virtual folder.
20
+ ** php_backend_dev** Name of our image to running.
21
+
22
+ # Source code for work
23
+ In the folder / volume / backend / public
24
+
25
+ ## Access to bash
26
+ ``` bash
27
+ docker exec -it backend bash
28
+ ```
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments