I want to add the container name to docker-compose.yml so my container doesn't get a randomly generated name.
I want to add the container name to docker-compose.yml so my container doesn't get a randomly generated name.
Add container_name attribute to your docker-compose.yml file so it becomes:
container_name: my_fancy_container_name
More info here https://docs.docker.com/compose/compose-file/#container_name