XJJÂ Â
Github:Â https://github.com/51sec/xjjphp-nginx docker
docker run -p 80:8080 trafex/php-nginx
docker run -p 80:8080 -v ~/my-codebase:/var/www/html trafex/php-nginx
Make Your Own XJJ Image
docker run -d -p 8080:8080 trafex/php-nginx2
docker exec -it <container name> sh3
docker exec -it --user root xjj sh
Outputs for our deployment of XJJ Github code.Â
node1] (local) [email protected] ~
$ docker exec -it --user=root epic_nobel /bin/sh
/var/www/html #Â
/var/www/html #Â
/var/www/html # apk update
fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/community/x86_64/APKINDEX.tar.gz
v3.16.2-210-g84cfb9e03b [https://dl-cdn.alpinelinux.org/alpine/v3.16/main]
v3.16.2-212-g313c9fb349 [https://dl-cdn.alpinelinux.org/alpine/v3.16/community]
OK: 17033 distinct packages available
/var/www/html # apk add git
(1/1) Installing git (2.36.2-r0)
Executing busybox-1.35.0-r17.trigger
OK: 128 MiB in 84 packages
/var/www/html # git clone https://github.com/51sec/xjj/
Cloning into 'xjj'...
remote: Enumerating objects: 364, done.
remote: Counting objects: 100% (63/63), done.
remote: Compressing objects: 100% (49/49), done.
remote: Total 364 (delta 38), reused 14 (delta 14), pack-reused 301
Receiving objects: 100% (364/364), 6.34 MiB | 24.80 MiB/s, done.
Resolving deltas: 100% (178/178), done.
/var/www/html # ls
index.php test.html xjj
cp -r /var/www/html/xjj/* /var/www/html
rm -f -r xjj
Change default index.php name to something else:
mv index.php info.php4
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.
Username: johnyan2
Password:Â
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded
[node1] (local) [email protected] ~
$ docker ps
CONTAINER IDÂ Â IMAGEÂ Â Â Â Â Â Â COMMANDÂ Â Â Â Â Â Â Â Â CREATEDÂ Â Â Â Â STATUSÂ Â Â Â Â Â Â Â Â Â PORTSÂ Â Â Â Â Â Â Â Â Â NAMES
0709187f6de8  trafex/php-nginx  "/usr/bin/supervisor…"  7 minutes ago  Up 7 minutes (healthy)  0.0.0.0:8080->8080/tcp  beautiful_kapitsa
[node1] (local) [email protected] ~
$ docker commit beautiful_kapitsa xjj
sha256:bfe9df406ac46e4e810ef5564a34f50be8b9589b4d4c054fc558ef79e27ba999
[node1] (local) [email protected] ~
$ docker image list
REPOSITORYÂ Â Â Â Â TAGÂ Â Â Â IMAGE IDÂ Â Â Â CREATEDÂ Â Â Â Â SIZE
xjj        latest  bfe9df406ac4  5 seconds ago  135MB
trafex/php-nginx  latest  3c715d61cf62  2 weeks ago   112MB
[node1] (local) [email protected] ~
$ docker tag xjj johnyan2/xjj:latest
[node1] (local) [email protected] ~
$ docker push johnyan2/xjj:latest
The push refers to repository [docker.io/johnyan2/xjj]
39fb7fab2513: PushedÂ
4214a3c20885: Mounted from trafex/php-nginxÂ
dd2d315098b6: Mounted from trafex/php-nginxÂ
b6a2073595e4: Mounted from trafex/php-nginxÂ
69aaabf84209: Mounted from trafex/php-nginxÂ
30a01461c06d: Mounted from trafex/php-nginxÂ
7676824158d7: Mounted from trafex/php-nginxÂ
563d480ebb0d: Mounted from trafex/php-nginxÂ
c5da130154cc: Mounted from trafex/php-nginxÂ
0c7d93256a9b: Mounted from trafex/php-nginxÂ
994393dc58e7: Mounted from trafex/php-nginxÂ
latest: digest: sha256:f52267b7f90e059203bd352d455aa18337f201d4649f96149cc46e7ea7e4b65c size: 2610
[node1] (local) [email protected] ~
$
Steps to Deploy to Virtual Hosting Service
Collecting Video URLS
Videos
ÂReferences
- Docker image site: https://hub.docker.com/repository/docker/johnyan2/xjj
- Github:Â https://github.com/51sec/xjj
- Demo:Â http://xjj.51sec.org/
No comments:
Post a Comment