Then you can choose from the maps that mod has. Since almost every mod I have seen automatically installs to its place, this should have yours listed (if not restart the launcher and check). If you are using a mod, then click the top left button that has a drop down menu and default says "Bf2". Note the map size will be based on the max players you have set (16=small, 32=medium, 64=large) and some maps (Like wake island) do not support smaller versions. Step 2: There are 2 tabs at the top, click the map settings and you can pick your maps that will be in rotation. You should also check "Internet" if playing on internet, obviously All the ratio's arent exactly ratios, the bot ratio is the amount of bots on the opposing team (mec/china), having 150 with 15 bots would be (usa)5v10(mec/china). You should make a new profile and choose all your options. Step 1: To start up a server you should have the Dedicated Server Launcher in your start/programs/battlefield 2 folder, it has an icon of a rocket. We had to look through a few pages and put the pieces together, so maybe this will help someone in the future Make sure Docker is set to use Linux containers.Ĭontributions to new or existing images are welcome if you want them public.Making this because me and 2 of my friends struggled for about an hour last night trying to find how to host a mod we downloaded as there were no servers for it, we googled a few times and it took us WAY to long to find information. Then make your changes in Dockerfile, build.sh, setup.sh and run.sh. Developmentįirst set up Docker Desktop on Windows (WSL2).ĭownload the assets (see assets.txt) and put them in the images/*/assets/ folder so you don't need to redownload them on each build. If you are not using a container registry then the images need to be built on the host first. Place the docker-compose.yml on the host and run docker-compose up -d -remove-orphans to create the containers. "/data/bf2/bf2-docker-2/volume:/volume " ports: ENV_BF2CCD_PASSWORD=bf2ccdpw123 volumes: "29900:29900/udp " bf2-docker-2-service:Ĭontainer_name: bf2-docker-2 image: nihlen/bf2-docker/bf2hub-pb-mm-bf2cc restart: on-failure environment: "/data/bf2/bf2-docker-1/volume:/volume " ports: Not practical since you can't play online but it can be used as a base.Ĭontainer_name: bf2-docker-1 image: nihlen/bf2-docker/bf2hub-pb-mm restart: on-failure environment: The basic image to run a Battlefield 2 server. For this use case I prefer using Docker Compose, an example is listed further down. Running multiple servers on the same host can be done by changing the ports in the environment variables and the mapped host port. To use these images on a remote host like a VPS you can either use the snippets below to build and run or you can build the images locally and then push them to a container registry like Docker Hub or Azure Container Registry (public or private). If you want to have full visibility of the server files you can also map the /home/bf2/srv folder of the container. Persisted files like settings, logs and demos are put in the /volume directory in the container using symbolic links and should be mapped to a host directory. Initial settings or passwords can be set using environment variables. To create your own, you can copy one of the existing images to use as a base, and then place your custom files in the assets/bf2 folder to overwrite any existing files. Prerequisitesĭifferent server variations are placed in the images folder. Uses multi-stage builds to keep the image sizes down. The base image is debian:stretch-slim and was tested on Linux containers in Windows 10 WSL2 and Debian 11. Dockerized Battlefield 2 server based on insanity54/bf42-dock.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |