[5 Mins Docker] Create Your Own 80s-90s DOS Gaming Website (1898 Games)
There are lots of Chinese DOS games in 1980s - 1990s. The Github page (https://github.com/rwv/chinese-dos-games) collected them and created a docker image to simplify the steps to bring them up into a website. You even can create your own website with just a couple of simple commands.
In this post, I am going to go through those steps in 5 minutes and show you how simple it is.
Github Page: https://github.com/rwv/chinese-dos-games
Screenshots
Installation Steps in Docker Playground
PWD https://labs.play-with-docker.com/
$ apk add virt-what
$ sudo 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-203-g16a4499ea3 [https://dl-cdn.alpinelinux.org/alpine/v3.16/main] v3.16.2-202-ge26245aea1 [https://dl-cdn.alpinelinux.org/alpine/v3.16/community] OK: 17053 distinct packages available [node1] (local) [email protected] ~ $ sudo apk add git OK: 395 MiB in 156 packages [node1] (local) [email protected] ~ $ git --version git version 2.36.2 [node1] (local) [email protected] ~ $
Note: If you are using PWD (Play with docker), the copy shortcut key is ctrl+insert, paste is ctrl+shift+v or ctrl+insert.
############################################################### # WARNING!!!! # # This is a sandbox environment. Using personal credentials # # is HIGHLY! discouraged. Any consequences of doing so are # # completely the user's responsibilites. # # # # The PWD team. # ############################################################### [node1] (local) [email protected] ~ $ df -m Filesystem 1M-blocks Used Available Use% Mounted on overlay 10240 0 10240 0% / tmpfs 64 0 64 0% /dev [node1] (local) [email protected] ~
We got 10G to play in this Docker Playground.
1 Create installation folder:
2 Create Own Security Policies
The all games will be about 36G. It will be too big for a docker image.
So there are two different ways to install it.
Method 1: using default docker image which only has about 40 games. The docker image size is about 600MB.
The docker compose file is:
Once done, you can type "docker compose up -d" to bring it up.
Here are all games:
游戏列表
- 仙剑奇侠传
- 模拟城市 2000
- 美少女梦工厂 2
- 同级生 2
- 大富翁3
- 明星志愿1
- 三国志IV
- 金庸群侠传
- 轩辕剑1
- 轩辕剑2
- 皇帝
- 轩辕剑外传:枫之舞
- 疯狂医院
- 大航海时代
- 大航海时代2
- 银河英雄传说III SP
- 三国志II
- 三国志III
- 三国志V
- 三国志V 威力加强版
- 三国志英杰传
- 主题医院 无声音版
- 三国演义
- 三界谕:邦沛之迷
- 殖民计划
- 炎龙骑士团II‧黄金城之谜
- 倚天屠龙记
- 信长之野望·天翔记
- 信长之野望·霸王传
- 金瓶梅之偷情宝鉴
- 江南才子唐伯虎
- 暗棋圣手
- 太阁立志传
- 非洲探险2
- 主题医院
- 航空霸业2
- 中国球王
- 艾蒂丝魔法大冒险
- 卧龙传
- 天使帝国
- 魔域传说Ⅳ:波斯战记
- 魔法公主
Of course, if you don't like docker compose file, you can use following one command to bring this game docker up :
docker run -d --name dosgame -p 8090:262 oldiy/dosgame-web-docker:latest
3 Method 2 : Install all games.
If there is no python or git, you might also need to run following commands to install them:
- apt update -y
- apt install git -y && apt install python3 -y
4 Check game files
1898
Installation Pre-requirements
Free resources you might need to complete this docker project:
- Server: Oracle Free VPS, Azure Free VPS, Google Cloud Free VPS, and others
- Create a Free Tier Windows/Linux Azure VPS VM
- [Free VPS] GCP (Google Cloud Platform) Tips and Tricks (Free 16G RAM, 4 vCPU VPS)
- System: Cloud Vendor Ubuntu, Debian, or DD an original version
- SWAP size increase: wget https://raw.githubusercontent.com/51sec/swap/main/swap.sh && bash swap.sh
- Enable Password ssh login
- Enable BBR
- systemctl restart docker
- Domain: (Optional) EU.ORG to get a free one, free Cloudflare account to manage your domain
- Confirm port has not been used (you might need to install lsof using command : apt install lsof):
- lsof -i:8088
Pre-installed services:
- Docker,
- apt update
- apt install docker.io
- apt install docker-compose
- apt upgrade docker.io
- mkdir /root/data/docker_data/<docker_name>
- Docker-Compose (Using Ubuntu OS for the commands)
- Docker-compose down
- Optional command : use following command to backup your Docker data. You might need to change your folder name based on your docker configuraiton
- cp -r /root/data/docker_data/<docker_name> /root/data/docker_data_backup/<docker_name>
- docker-compose pull
- docker-compose up -d
- docker image prune
- Portainer (Optional)
- docker volume create portainer_data
- docker run -d -p 9000:9000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest
- Install some applications: apt install wget curl sudo vim git (Optional)
- aapanel with Nginx (Optional)
- Nginx Proxy Manager (Optional)
- Install screen (Optional)
- Install screen (Depends on the Linux Distribution if it came pre installed or not) : yum install screen
- Initiate a Screen : screen or screen -S <screen name> <command to execute>
- Detach from the screen : "CTRL+A,D" not "CTRL+A+D"
- List all the screen currently working : screen -ls
- Reattach to a screen : screen -r <session number> or screen -r <screen name>
- Kill specific screen: screen -X -S <screen name> quit
- Kill all screens : pkill screen
Install it from GCP Free VPS
docker run -d --name dosgame -p 8090:262 oldiy/dosgame-web-docker:latest
docker run -d --name dosgame -p 8090:262 -v /docker_data/dosgame/games:/app/static/games oldiy/dosgame-web-docker:latest
Videos
共有 0 条评论