docker: Error response from daemon: Conflict. The container name "/basexhttp" is already in use by container
You're attempting to create two different containers, each with the same name. Each time you execute docker run it will create a container, and you've named the containers the same with --name basexhttp. These names must be unique, even among stopped containers. To delete an unneeded container, you can stop and remove it with:
docker container stop basexhttp
docker container rm basexhttp

(Note that docker stop and docker rm also work, but it's easier to read and understand the more verbose syntax)