- Joined
- Jul 17, 2007
- Messages
- 665
- Reaction score
- 104
Hi, i repacked my server and this time i use docker for it
Why docker?
- it use shared resource (unlike VirtualBox where you must give from your ram, cpu, hard drive etc)
- use less memory
- less used disk space also it is not constant because it use your os hard drive flexible way
- faster setup, since you not need to worry about install ubuntu and setup too much
- forget the ssh for file exchange, use docker volume (shared folder from host, which accessible from docker container)
Pro in the pack:
- latest ubuntu (22.04)
- latest mariaDB (instead of mysql)
- php is the latest php (8)
- java openjdk 11 (latest)
Requirement:
- Windows: install Docker Desktop
- Linux: install docker and docker
How it is works
- Pull the latest (22.04) ubuntu image
- Run the pulled image as container (with volumes)
- run my install_into_docker.sh which setup everything
- check your IP and update in the client and play
- now you can commit the docker container (check in docker documents) and later you can start the container from commited image in few second when u want use it again
* note do not forget to mount the folders for db and sql db
Very basic usage
Step1:
install the docker:
Step2:
start container from windows:
- C:\MyFolderInWindows: your shared folder from windows what you will mount into the container
- /home/pw: your above folder content will be mounted inside the ubuntu container into the this folder
- pw-u22: container name, you can give different name if you wish, it helps to reference to the running container
- the apache/php port in your windows will be 8081, you can get the container IP when you use ipconfig in windows then use the port with it, example: 172.28.192.1:8081/pwAdmin, you must use the ip for the client as well
- ubuntu:jammy: name of the latest ubuntu
- /bin/bash: container entrypoint, this means when you type exit inside the container then it will close the container as well
start container from linux:
Very similar to windows, biggest difference is the linux allow you to use container on host network, this means all port will be accessable same way as your host, if your host machine is on lan and have example this ip: 192.168.1.106 then you can access the container with same ip, so you access the web and use same ip for the client too and accessable from the other lan users too
Step3:
- download the
- inside the container go and execute (installation should takes minutes and since also it will download the server files based on your internet speed too)
- enter into the root folder and start the server
* this install everything which needed (also download and setup the server too), create an admin for your server, install and setup the web as well, check the install_into_docker.sh
Step4:
- download the
- update the client ip in server list and start it
Server and script:
Why docker?
- it use shared resource (unlike VirtualBox where you must give from your ram, cpu, hard drive etc)
- use less memory
- less used disk space also it is not constant because it use your os hard drive flexible way
- faster setup, since you not need to worry about install ubuntu and setup too much
- forget the ssh for file exchange, use docker volume (shared folder from host, which accessible from docker container)
Pro in the pack:
- latest ubuntu (22.04)
- latest mariaDB (instead of mysql)
- php is the latest php (8)
- java openjdk 11 (latest)
Requirement:
- Windows: install Docker Desktop
- Linux: install docker and docker
How it is works
- Pull the latest (22.04) ubuntu image
- Run the pulled image as container (with volumes)
- run my install_into_docker.sh which setup everything
- check your IP and update in the client and play
- now you can commit the docker container (check in docker documents) and later you can start the container from commited image in few second when u want use it again
* note do not forget to mount the folders for db and sql db
Very basic usage
Step1:
install the docker:
You must be registered to see links
Step2:
start container from windows:
- C:\MyFolderInWindows: your shared folder from windows what you will mount into the container
- /home/pw: your above folder content will be mounted inside the ubuntu container into the this folder
- pw-u22: container name, you can give different name if you wish, it helps to reference to the running container
- the apache/php port in your windows will be 8081, you can get the container IP when you use ipconfig in windows then use the port with it, example: 172.28.192.1:8081/pwAdmin, you must use the ip for the client as well
- ubuntu:jammy: name of the latest ubuntu
- /bin/bash: container entrypoint, this means when you type exit inside the container then it will close the container as well
Code:
docker run -it --rm -v C:\MyFolderInWindows:/home/pw --name pw-u22 -p 8080:8080 -p 29000:29000 -p 8081:80 -p 3306:3306 --privileged ubuntu:jammy /bin/bash
start container from linux:
Very similar to windows, biggest difference is the linux allow you to use container on host network, this means all port will be accessable same way as your host, if your host machine is on lan and have example this ip: 192.168.1.106 then you can access the container with same ip, so you access the web and use same ip for the client too and accessable from the other lan users too
Code:
docker run -it --rm -v /home/myuser/myhostsharedfolder:/home/pw --name pw-u22 --net=host --privileged ubuntu:jammy /bin/bash
Step3:
- download the
You must be registered to see links
file and copy your host folder which you share with the container- inside the container go and execute (installation should takes minutes and since also it will download the server files based on your internet speed too)
- enter into the root folder and start the server
Code:
cd /home/pw
./install_into_docker.sh
cd /root
startip.sh
Step4:
- download the
You must be registered to see links
- update the client ip in server list and start it
Server and script:
You must be registered to see links
Attachments
You must be registered for see attachments list
Last edited: