Skip to content

Instantly share code, notes, and snippets.

@dmnc-net
Created January 25, 2022 10:09
Show Gist options
  • Save dmnc-net/523c155bacc1b44fa4fac2d5fc7ab9b6 to your computer and use it in GitHub Desktop.
Save dmnc-net/523c155bacc1b44fa4fac2d5fc7ab9b6 to your computer and use it in GitHub Desktop.
MKTXP docker helpers

MKTXP docker helpers

For building and running akpw/mktxp as a container.

#!/bin/sh
DIR=".mktxp.git"
[ -d "${DIR}" ] || git clone https://github.com/akpw/mktxp.git ${DIR}
cd ${DIR}
git pull
docker build --rm -f Dockerfile -t mktxp:git .
#!/bin/sh
CONFIG_DIR="/srv/mktxp"
TZ="Europe/Prague"
NET="user_bridge"
PREFIX="mktxp-"
#######################
if [ "${1}" == "" ]; then echo "* usage ${0} [setup], possible setups:"; ls -d */ | sed 's/\/$//'; exit; fi
PORT=`grep port ${1}/_mktxp.conf|awk '{print $3}'`
docker run -it -d --name ${PREFIX}${1} --network ${NET} --hostname ${PREFIX}${1} -v ${CONFIG_DIR}/${1}:/root/mktxp:rw -e TZ=${TZ} -p 0.0.0.0:${PORT}:${PORT} mktxp:git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment