docker: Error response from daemon: Conflict. The container name "/basexhttp" is already in use by container Am I even correctly following the documentation on creating and running a docker container below?
[root@ ~]# 
[root@ ~]# docker run -d \
&gt;     --name basexhttp \
&gt;     --publish 1984:1984 \
&gt;     --publish 8984:8984 \
&gt;     --volume &quot;$HOME/basex/data&quot;:/srv/basex/data \
&gt;     --volume &quot;$HOME/basex/repo&quot;:/srv/basex/repo \
&gt;     --volume &quot;$HOME/basex/webapp&quot;:/srv/basex/webapp \
&gt;     basex/basexhttp:latest
4b827c082bebe45b8be5b7c956f1ada92407181aeec82dc5f71a63f2c5af537e
[root@ ~]# 
[root@ ~]# docker run -ti \
&gt;     --name basexhttp \
&gt;     --publish 1984:1984 \
&gt;     --publish 8984:8984 \
&gt;     --volume &quot;$(pwd)/basex/data&quot;:/srv/basex/data \
&gt;     basex/basexhttp:latest
docker: Error response from daemon: Conflict. The container name &quot;/basexhttp&quot; is already in use by container &quot;4b827c082bebe45b8be5b7c956f1ada92407181aeec82dc5f71a63f2c5af537e&quot;. You have to remove (or rename) that container to be able to reuse that name.
See 'docker run --help'.
[root@ ~]# 
[root@ ~]# 
[root@ ~]# docker container list
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
[root@ ~]# 
[root@ ~]# docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
[root@ ~]# 
[root@ ~]# docker ps -a
CONTAINER ID        IMAGE                    COMMAND                  CREATED              STATUS                          PORTS               NAMES
4b827c082beb        basex/basexhttp:latest   &quot;/usr/local/bin/mvn-…&quot;   About a minute ago   Exited (1) About a minute ago                       basexhttp
[root@ ~]# 

referencing:
https://hub.docker.com/r/basex/basexhttp/
https://docs.basex.org/index.php?title=Docker&amp;mobileaction=toggle_view_desktop
where I've copied/pasted what I think are the relevant commands.
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)