Skip to content

Instantly share code, notes, and snippets.

@Wildcarde
Last active December 16, 2020 12:00
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Wildcarde/41fd9f182fd8dc191c1c to your computer and use it in GitHub Desktop.
Save Wildcarde/41fd9f182fd8dc191c1c to your computer and use it in GitHub Desktop.
Jedi Knight: Jedi Academy Dockerized Server
## Docker file to build a jedi academy server and mount the apk files from a source folder
FROM centos
MAINTAINER Garrett McGrath <gmcgrath815 at gmail.com>
RUN yum install -y wget unzip
RUN wget https://www.dropbox.com/s/mbdmpim04krl1o2/jalinuxded_1.011.zip?dl=0 -O /tmp/temp.zip; unzip /tmp/temp.zip -d /opt/jaserv; \
wget https://www.dropbox.com/s/ig82qlsohlbwzye/dedicated_ja_server_unofficialpatch.zip?dl=0 -O /tmp/patch.zip; unzip /tmp/patch.zip -d /tmp/patch; \
cp /tmp/patch/DEDICATED_JA_server_UnofficialPATCH/linuxjampded /opt/jaserv/linuxjampded; \
rm /tmp/temp.zip /tmp/patch.zip; rm -fr /tmp/patch; \
cp /opt/jaserv/libcxa.so.1 /usr/lib; \
chmod +x /opt/jaserv/linuxjampded
RUN yum install -y glibc.i686
#you could remove this line and be fine but if you want to wrap the CMD below in screen it could prove useful
RUN yum install -y screen
RUN rm /opt/jaserv/server.cfg; \
ln -s /data /opt/jaserv/base; \
ln -s /data /opt/jaserv/server.cfg
#add volume that can be mounted as /data
#this volume must have the apks required for the jaserv binary
#the mounted volume requires assets0.pk3, assets1.pk3 and assets2.pk3 from the retail install
#the server.cfg placed in this mounted folder will be used to run the server.
VOLUME ["/data"]
#expose the ports required for the server to advertise as intended
EXPOSE 29060-29062/udp 29070-29081/udp
WORKDIR /data
#run the server
CMD ["/opt/jaserv/linuxjampded","+set","dedicated","2","+exec","server.cfg"]
#! /bin/bash
docker rm -f jaserv
docker run -t=true -d --restart=always --name jaserv -v /jaserverdoc:/data --net=host wildcarde/jaserv
// Server Config
seta sv_hostname "Server!"
seta g_motd "Welcome to this dockerized server!"
//rconpassword "my secret password"
// hopefully set external ip?
seta sv_maxclients 20
set timelimit 20
// gametypes
// 0 = FFA
// 3 = DUEL one on one tournament
// 4 = POWER DUEL
// 6 = TEAM DEATHMATCH
// 7 = SIEGE
// 8 = CTF
// below will rotate through all multiplayer maps
// found in the assets0.pk3 file and use the correct
// gametype for each map - currently commented out.
#set d1 "set g_gametype 0; map mp/ffa1 ; set nextmap vstr d2"
#set d2 "set g_gametype 0; map mp/ffa2 ; set nextmap vstr d3"
#set d3 "set g_gametype 0; map mp/ffa3 ; set nextmap vstr d4"
#set d4 "set g_gametype 0; map mp/ffa4 ; set nextmap vstr d5"
#set d5 "set g_gametype 0; map mp/ffa5 ; set nextmap vstr d6"
#set d6 "set g_gametype 8; map mp/ctf1 ; set nextmap vstr d7"
#set d7 "set g_gametype 8; map mp/ctf5 ; set nextmap vstr d8"
#set d8 "set g_gametype 8; map mp/ctf5 ; set nextmap vstr d9"
#set d9 "set g_gametype 8; map mp/ctf5 ; set nextmap vstr d10"
#set d10 "set g_gametype 8; map mp/ctf5 ; set nextmap vstr d11"
#set d11 "set g_gametype 3; map mp/duel1 ; set nextmap vstr d12"
#set d12 "set g_gametype 3; map mp/duel2 ; set nextmap vstr d13"
#set d13 "set g_gametype 3; map mp/duel3 ; set nextmap vstr d14"
#set d14 "set g_gametype 3; map mp/duel4 ; set nextmap vstr d15"
#set d15 "set g_gametype 3; map mp/duel5 ; set nextmap vstr d16"
#set d16 "set g_gametype 3; map mp/duel6 ; set nextmap vstr d17"
#set d17 "set g_gametype 3; map mp/duel7 ; set nextmap vstr d18"
#set d18 "set g_gametype 3; map mp/duel8 ; set nextmap vstr d19"
#set d19 "set g_gametype 3; map mp/duel9 ; set nextmap vstr d20"
#set d20 "set g_gametype 3; map mp/duel10 ; set nextmap vstr d21"
#set d21 "set g_gametype 7; map mp/siege_desert ; set nextmap vstr d22"
#set d22 "set g_gametype 7; map mp/siege_hoth ; set nextmap vstr d23"
#set d23 "set g_gametype 7; map mp/siege_korriban ; set nextmap vstr d1"
//server active config.
set d1 "set g_gametype 0; map mp/ffa1 ; set nextmap vstr d2"
set d2 "set g_gametype 0; map mp/ffa2 ; set nextmap vstr d3"
set d3 "set g_gametype 0; map mp/ffa3 ; set nextmap vstr d4"
set d4 "set g_gametype 0; map mp/ffa4 ; set nextmap vstr d5"
set d5 "set g_gametype 0; map mp/ffa5 ; set nextmap vstr d6"
#set d6 "set g_gametype 8; map mp/ctf1 ; set nextmap vstr d7"
#set d7 "set g_gametype 8; map mp/ctf5 ; set nextmap vstr d8"
#set d8 "set g_gametype 8; map mp/ctf5 ; set nextmap vstr d9"
#set d9 "set g_gametype 8; map mp/ctf5 ; set nextmap vstr d10"
#set d10 "set g_gametype 8; map mp/ctf5 ; set nextmap vstr d11"
set d11 "set g_gametype 0; map mp/duel1 ; set nextmap vstr d12"
set d12 "set g_gametype 0; map mp/duel2 ; set nextmap vstr d13"
set d13 "set g_gametype 0; map mp/duel3 ; set nextmap vstr d14"
set d14 "set g_gametype 0; map mp/duel4 ; set nextmap vstr d15"
set d15 "set g_gametype 0; map mp/duel5 ; set nextmap vstr d16"
set d16 "set g_gametype 0; map mp/duel6 ; set nextmap vstr d17"
set d17 "set g_gametype 0; map mp/duel7 ; set nextmap vstr d18"
set d18 "set g_gametype 0; map mp/duel8 ; set nextmap vstr d19"
set d19 "set g_gametype 0; map mp/duel9 ; set nextmap vstr d20"
set d20 "set g_gametype 0; map mp/duel10 ; set nextmap vstr d21"
#set d21 "set g_gametype 7; map mp/siege_desert ; set nextmap vstr d22"
#set d22 "set g_gametype 7; map mp/siege_hoth ; set nextmap vstr d23"
#set d23 "set g_gametype 7; map mp/siege_korriban ; set nextmap vstr d1"
#// start the first map
vstr d1
#//ad servers - thes don't seem to work..
set sv_master1 "masterjk3.ravensoft.com"
set sv_master2 "master.jkhub.org"
#// server opts
seta g_weaponDisable "524278"
seta bot_minplayers 3
seta g_dismember 100
seta cg_dismember 2
seta broadsword 1
seta g_saberdamagescale "10000"
seta g_privateduel "1"
seta sv_hostname "^1Your_server’s_name_goes_here"
seta g_motd "^3Your_greeting_goes_here!"
seta rconpassword "your_rconpassword_goes_here"
seta g_allowvote "0" // 0 to disable voting, 1 to enable voting
seta g_dismember "100" // the percentage (%) of time dismemberment will occur
seta g_filterBan "1" // 1 allows players to be banned from the server
seta g_forceRegenTime "200" // this default setting is recommended
seta g_forcepowerDisable "0" // disables Force powers based on a calculated bit-value
seta g_friendlyFire "0" // 1 means your weapons can damage teammates
seta g_gametype "0"
// For JK2: FFA 0, Holocron 1, Jedi Master 2, Duel 3, TFFA 5, CTF 7, CTY 8
// For JA: FFA 0, Duel 3, Power Duel 4, TFFA 6, Siege 7, CTF 8
seta g_inactivity "300" // kicks off idle players after 300 seconds
seta g_logClientInfo "1" // some player information will be recorded in the log
seta g_log "games.log" // the filename of the log file
seta g_locationBasedDamage "0"// damage depends upon what is hit (JA only)
seta g_maxForceRank "7" // sets the maximum Force rank available to players (1-7). 7 is Jedi Master Force points (100)
//seta g_password "yourpassword" // remove the leading // to activate, change password to "none" to deactivate
seta g_privateduel "0"// If 1 then one player can challenge another to duel in FFA
seta g_saberdamagescale "1" // controls the damage caused by lightsabers
seta g_teamAutoJoin "0" // If 1, new players are automatically placed on a team
seta g_teamForceBalance "0" // 0 allows numerically unbalanced teams
seta g_weaponDisable "0" // disables weapons based on a calculated bit-value
seta g_doWarmup "0"// If 1, there will be a warmup period set by g_warmup before the game begins (JK2 only)
seta g_warmup "30"// If g_doWarmup is 1, the length of the warmup period in seconds (JK2 only)
seta sv_maxclients 8 // the maximum number of players you will host. Related to your upload bandwidth and sv_maxrate
seta sv_maxRate 4000 // Related to your upload bandwidth and sv_maxclients. 4000 is the minimum for decent ping
seta sv_maxping "500" // only clients with pings lower than this can connect
seta sv_reconnectlimit "5" // number of times a client can attempt to connect
seta sv_zombietime "10" // seconds before a disconnected client is dropped
seta sv_pure "0" // 1 prevents some cheats but also use of skins and other files
seta sv_allowDownload "0" // 0 means the server won’t try to send files to the client
seta sv_allowAnonymous "0" // 0 prevents players joining anonymously
seta sv_timeout "200" // seconds before a client attempting to connect is dropped
seta sv_PrivateClients "0" // reserves and subtracts this # of slots from public slots
seta sv_PrivatePassword "" // the password to access reserved private slots
//These are the master servers to which your server will send “heartbeats”
seta sv_master1 "masterjk3.ravensoft.com" //change this to "masterjk2.ravensoft.com" for Jedi Knight II: Jedi Outcast
seta sv_master2 "qtracker.com"
seta sv_master3 "clanservers.net"
seta sv_master4 "master0.gamespy.com"
seta fraglimit "100" // a player wins if they score this before time runs out. For Duel, number of duels to win one round
seta duelFragLimit "10"// For Duel, the number of rounds to win the map\game
seta caplimit "10" // number of flag captures to win and end a CTF game before time runs out
seta timelimit "20" // minutes that each map runs
seta logfile "1" // generates the logfile named by g_log above
seta g_autoMapCycle "1" // set this to 0 if you will use a custom map rotation
map "your_starting_map" // you MUST state a starting map or the server won't start
// For a custom map rotation, use this design. You must remove the // in front of the lines to use them.
//seta g_autoMapCycle "0"
//set m1 "map NameOfFirstMap;set nextmap vstr m2"
//set m2 "map NameOfSecondMap;set nextmap vstr m3"
//set m3 "map NameOfThirdMap;set nextmap vstr m4"
// and so on and so on until you get to the last map in the cycle
//set m4 "map NameOfLastMap;set nextmap vstr m1"
//vstr m1 // this tells the server to start the first map in the custom rotation
//
//
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment