America's Army Docker Container
This Docker container runs an America's Army 2.8.5 dedicated server. It is built on the WINE image and runs the retail game's Unreal Engine 2 server, System/Server.exe. The container doesn't download the game, so you provide the files.
Quick Start
services:
americasarmy:
image: lancommander/americasarmy:latest
container_name: americasarmy
ports:
- 1716:1716/udp
- 7778:7778/udp
volumes:
- "/data/Servers/America's Army/Objective:/config"
environment:
AA_SERVER_NAME: "My America's Army Server"
AA_MAP: "Bridge"
AA_MAPS: "Bridge,Border,Pipeline,SFhospital,Steamroller"
AA_ADMIN_PASSWORD: "changeme"
user: root
cap_add:
- SYS_ADMIN
security_opt:
- apparmor:unconfined
restart: unless-stopped
Copy an America's Army 2.8.5 install (the folder with System/Server.exe and Maps/) into Server/ before the first start. You can instead set AA_ARCHIVE_URL to a zip of that folder.
How It Starts
PostInitialization/10-InitializeWinePrefix.ps1(from the WINE image) creates the Wine prefix in/config/wineprefix.PostInitialization/20-InstallAmericasArmy.ps1checks forServer/System/Server.exe. If it's missing andAA_ARCHIVE_URLis set, the hook downloads the archive, extracts the shallowest folder that holdsSystem/Server.exe, and remounts the overlay.PostInitialization/30-ConfigureAmericasArmy.ps1writes the non-emptyAA_*settings intoSystem/server.ini(AA_INI) throughMerged/, so the edited copy lands inOverlay/System/. It sets the GameSpy query IP to the container's address and, ifAA_MAPSis set, rewrites the map rotation.START_EXE(/usr/local/bin/aa-server) runsServer.exe <AA_MODE> <AA_MAP>.aao ini=server.ini log=server.logfromSystem/under Wine.
A successful start ends with:
Game class is 'AGP_GameTeamObjective'
...
GameSpyQR - IP: 10.0.1.x port:1716 lan: 1 nat: 0
GameSpy - IP: 10.0.1.x port: 7778 Public: 0 NAT: 0
Lan server. Not initializing DBMBS.
...
completed loading
Configuration Options
Ports
- 1716/udp: Game (
AA_PORT) - 7778/udp: GameSpy query (QR2).
\status\and theFE FDprotocol return the name, map, version (gamever 2.8.5.0), round and rules.
RunServer.bat also lists 1717, 1718, 8777, 27900 and the DBAuth TCP ports. In LAN mode under 2.8.5 the server binds only 1716 and 7778; the rest belong to the shut-down official master, stats and auth services.
Server modes
AA_MODE is the first Server.exe argument. LAN lists the server in the LAN browser and needs no authorization. LANTOURNAMENT turns on tournament mode ([AGP_Gameplay.AGP_GameTournament]), and LANETA/LANETATOURNAMENT run Instant Action. GLOBAL and TOURNAMENT register with the official America's Army services, which are gone: the server times out on the auth server, logs Reverting server to LAN mode and then crashes with a general protection fault.
Environment Variables
See the README for the full table.
Server ini
Overlay/System/server.ini is yours to edit. Only the keys that have a non-empty AA_* variable are rewritten on start. Delete it to go back to the stock file.
- Round rules:
[Engine.GameInfo] TimeLimit,MaxPlayers;[AGP_Gameplay.AGP_GameDeathMatch] RoundsPerMatch,InitialWarmupTime,MinNetPlayers; team balance in[AGP_Gameplay.AGP_GameTeam]. - Map rotation: repeated
Maps=lines plusMapNum=in[AGP_Gameplay.AGP_MapList], used only when[AGP_Gameplay.AGP_GameDeathMatch] bCycleMaps=True.AA_MAPSwrites all three. The stock list names maps that aren't in 2.8.5 (SFOasis,SFWaterTreatment,SFBlizzard), but it's off by default. - Gameplay:
[AGP.AGP_GameInfo] ForceGameplay(FORCE_None,FORCE_Normal,FORCE_MILES),bOpenAllWeaponClassSlots. - Admins:
[Engine.AccessControl] AdminPassword(AA_ADMIN_PASSWORD), andPlayerAdmin=lines in the same section.
The server may save its config to the ini on exit, so values can also change there after an admin command.
Hooks
| Hook | When |
|---|---|
PreInstallAmericasArmy / PostInstallAmericasArmy | Around the game file check/download |
PreInitializeWinePrefix / PostInitializeWinePrefix | Around Wine prefix creation (WINE image) |
Put .ps1 scripts in config/Scripts/Hooks/<HookName>/.
Troubleshooting
- Server not in the LAN browser: the browser finds servers by UDP broadcast, so the container needs its own LAN address (macvlan/ipvlan) or host networking. Joining by IP works through port mapping. With port mapping or NAT, set
AA_GAMESPY_IPto the address clients should use. - Internet listing / OpenSpy: not supported. The master server hostnames in
System/IpDrv.dll(%s.master.gamespy.com,%s.ms%d.gamespy.com) can be byte-patched toopenspy.net, but a LAN-mode server never heartbeats (GameSpy ... Public: 0),GLOBALmode crashes (see Server modes), and the.upackages are encrypted, so the script that sets the public flag can't be changed. OpenSpy also doesn't listarmygameamong its supported games. Clients join by LAN browser or IP. - Clients can't join / version mismatch: the server reports
gamever 2.8.5.0. Clients need 2.8.5 with the same maps;bEnableMapTesting/bEnableCodeTestingcompare them. Can't find host dms1.americasarmy.com: harmless. The server looks for an updatedTours.inion the old official server.Player administrator entry "" is not using the correct format: harmless; it's the emptyPlayerAdminexample in the stock ini.- Settings ignored: they go into
AA_INI(System/server.ini), notArmyOps.iniorDefault.ini. CheckOverlay/System/server.ini. System/Server.exe not found:Server/must contain the game folder itself (Server/System/Server.exe), not a folder that contains it.