From e0ebad548b1af895d3089377db43674d128b22bb Mon Sep 17 00:00:00 2001 From: Niventill Date: Sat, 21 Jan 2023 17:08:00 +0100 Subject: [PATCH] Update README --- README.md | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 6beac3c..ad6ed41 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Unofficial Docker image for Multi Theft Auto: San Andreas game server. Maintaine - Total image size is oscillating around 100MiB - **64-bit server only** - On Windows, only the [**Docker Desktop with WSL 2 backend**](https://docs.docker.com/docker-for-windows/wsl/) is supported, so expect weird issues with different setup (been there, done that, big NOPE from me). On Linux there are no problems at all. -- The tags always reflect the specific version and build number of the MTA server which they contain, i.e. `1.5.7-20595-v4` +- The tags always reflect the specific version and build number of the MTA server which they contain, i.e. `1.5.9-21437-v1` > **Note:** the `v4` in this example is the version number of the tag itself because sometimes something might go wrong and an updated release of the same version and build number is needed) @@ -109,7 +109,7 @@ docker run --name mta-server \ -p 22005:22005 \ -v $(pwd)/mta-resources:/resources \ # mount mta resources dir -v $(pwd)/data:/data \ # mount mta data dir (config, acl, banlist, internal DBs etc.) -notfound/mtasa-server:1.5.7-20359-v17 # remember to adjust the tag name +notfound/mtasa-server:1.5.9-21437-v1 # remember to adjust the tag name ``` From powershell (basically the only difference is `pwd` syntax): @@ -122,7 +122,7 @@ docker run --name mta-server \ -p 22005:22005 \ -v ${PWD}/mta-resources:/resources \ # mount mta resources dir -v ${PWD}/data:/data \ # mount mta data dir (config, acl, banlist, internal DBs etc.) -notfound/mtasa-server:1.5.7-20359-v17 # remember to adjust the tag name +notfound/mtasa-server:1.5.9-21437-v1 # remember to adjust the tag name ``` ## More examples @@ -139,7 +139,7 @@ docker run --name mta-server \ -p 22003:22003/udp \ -p 22005:22005 \ -v $(pwd)/mta-resources:/resources \ -notfound/mtasa-server:1.5.7-20359-v17 +notfound/mtasa-server:1.5.9-21437-v1 ``` #### Or with access to /data (mtaserver.conf, acl.xml etc.) @@ -151,7 +151,7 @@ docker run --name mta-server \ -p 22005:22005 \ -v $(pwd)/mta-resources:/resources \ -v $(pwd)/data:/data \ -notfound/mtasa-server:1.5.7-20359-v17 +notfound/mtasa-server:1.5.9-21437-v1 ``` ### Running as non-root user: @@ -160,7 +160,7 @@ notfound/mtasa-server:1.5.7-20359-v17 docker run --name mta-server \ -u $(id -u):$(id -g) # set uid and gid of current user -t \ # allocate tty (always required) -notfound/mtasa-server:1.5.7-20359-v17 # remember to adjust the tag name +notfound/mtasa-server:1.5.9-21437-v1 # remember to adjust the tag name ``` ### Running in the background (daemonized): @@ -169,7 +169,7 @@ notfound/mtasa-server:1.5.7-20359-v17 # remember to adjust the tag name docker run --name mta-server \ -d # detach -t \ # allocate tty (always required) -notfound/mtasa-server:1.5.7-20359-v17 # remember to adjust the tag name +notfound/mtasa-server:1.5.9-21437-v1 # remember to adjust the tag name ``` ### Expose resource-cache to setup external fastdl server @@ -178,7 +178,7 @@ notfound/mtasa-server:1.5.7-20359-v17 # remember to adjust the tag name docker run --name mta-server \ -t \ # allocate tty (always required) -v $(pwd)/resource-cache:/resource-cache \ # mount cache dir, you only need it if you have fastdl server setup -notfound/mtasa-server:1.5.7-20359-v17 # remember to adjust the tag name +notfound/mtasa-server:1.5.9-21437-v1 # remember to adjust the tag name ``` ### Enforce server password on startup @@ -188,7 +188,7 @@ docker run --name mta-server \ -e MTA_SERVER_PASSWORD=mypassword -e MTA_SERVER_PASSWORD_REPLACE_POLICY=always # always update the entry in the active server config with the value of MTA_SERVER_PASSWORD -t \ # allocate tty (always required) -notfound/mtasa-server:1.5.7-20359-v17 # remember to adjust the tag name +notfound/mtasa-server:1.5.9-21437-v1 # remember to adjust the tag name ``` ### Set server password on startup, but only if it's not already set in the config @@ -198,7 +198,7 @@ docker run --name mta-server \ -e MTA_SERVER_PASSWORD=mypassword -e MTA_SERVER_PASSWORD_REPLACE_POLICY=when-empty # only update the entry in the active server config if it's not already set -t \ # allocate tty (always required) -notfound/mtasa-server:1.5.7-20359-v17 # remember to adjust the tag name +notfound/mtasa-server:1.5.9-21437-v1 # remember to adjust the tag name ``` `when-empty` is the default policy, so this can be simplified to just: @@ -207,7 +207,7 @@ notfound/mtasa-server:1.5.7-20359-v17 # remember to adjust the tag n docker run --name mta-server \ -e MTA_SERVER_PASSWORD=mypassword -t \ # allocate tty (always required) -notfound/mtasa-server:1.5.7-20359-v17 # remember to adjust the tag name +notfound/mtasa-server:1.5.9-21437-v1 # remember to adjust the tag name ``` ### Automatically clear server password on startup if it's set in the config @@ -216,7 +216,7 @@ notfound/mtasa-server:1.5.7-20359-v17 # remember to adjust the tag n docker run --name mta-server \ -e MTA_SERVER_PASSWORD_REPLACE_POLICY=unless-empty # only update the entry in the active server config if it has some value -t \ # allocate tty (always required) -notfound/mtasa-server:1.5.7-20359-v17 # remember to adjust the tag name +notfound/mtasa-server:1.5.9-21437-v1 # remember to adjust the tag name ``` ### Use custom config file @@ -230,7 +230,7 @@ docker run --name mta-server \ -e MTA_SERVER_CONFIG_FILE_NAME=mtaserver.mycustom.conf -t \ # allocate tty (always required) -v ${PWD}/data:/data \ # mount mta data dir (config, acl, banlist, internal DBs etc.) -notfound/mtasa-server:1.5.7-20359-v17 # remember to adjust the tag name +notfound/mtasa-server:1.5.9-21437-v1 # remember to adjust the tag name ``` @@ -243,14 +243,13 @@ To build the image manually I use this exact command: From bash: ``` -env MTA_SERVER_VERSION=1.5.7 MTA_SERVER_BUILD_NUMBER=20359 IMAGE_VERSION=7 \ -docker build --build-arg MTA_SERVER_VERSION=${MTA_SERVER_VERSION} -t mtasa-server:${MTA_SERVER_VERSION}-${MTA_SERVER_BUILD_NUMBER}-v${IMAGE_VERSION} . +env MTA_SERVER_VERSION=1.5.9 MTA_SERVER_BUILD_NUMBER=21437 IMAGE_VERSION=1 \ +docker build --build-arg MTA_SERVER_VERSION=${MTA_SERVER_VERSION} --build-arg MTA_SERVER_BUILD_NUMBER=${MTA_SERVER_BUILD_NUMBER} -t mtasa-server:${MTA_SERVER_VERSION}-${MTA_SERVER_BUILD_NUMBER}-v${IMAGE_VERSION} . ``` From powershell: ``` -$env:MTA_SERVER_VERSION="1.5.7"; $env:MTA_SERVER_BUILD_NUMBER="20359"; $env:IMAGE_VERSION="7"; -docker build --build-arg MTA_SERVER_VERSION=$env:MTA_SERVER_VERSION -t mtasa-server:$env:MTA_SERVER_VERSION-$env:MTA_SERVER_BUILD_NUMBER-v$env:IMAGE_VERSION . +$env:MTA_SERVER_VERSION="1.5.9"; $env:MTA_SERVER_BUILD_NUMBER="21437"; $env:IMAGE_VERSION="1"; +docker build --build-arg MTA_SERVER_VERSION=$env:MTA_SERVER_VERSION --build-arg MTA_SERVER_BUILD_NUMBER=$env:MTA_SERVER_BUILD_NUMBER -t mtasa-server:$env:MTA_SERVER_VERSION-$env:MTA_SERVER_BUILD_NUMBER-v$env:IMAGE_VERSION . ``` -