
if [[ "$1" == '' ]]; then
	cmd="cd /mattermost-src/cmd/mattermost; go build"
	mm_path=/home/domi/mattermost-server
else
	cmd="cd /mattermost-src/; $@"
	mm_path="$PWD"
fi

docker run --rm -it \
	-v $mm_path:/mattermost-src \
	mattermost/mattermost-build-server:20220415_golang-1.18.1 \
	bash -c "$cmd"
