It's not possible to have an empty project name as it's used internally by docker as part of the key for container.

It's discussed in more detail here: Proposal: support for empty project names.

Answer from silleknarf on Stack Overflow
🌐
GitHub
github.com › earthly › earthly › issues › 3164
WITH DOCKER using compose gives "Project name not found" · Issue #3164 · earthly/earthly
August 4, 2023 - Exit code 15 +repro | Overriding args used: +repro | Completed in 90.1195ms earthfile2llb immediate error: Earthfile line 9:8 with docker run: read compose config file: process "/bin/sh -c EARTHLY_START_COMPOSE=\"true\" EARTHLY_COMPOSE_FILES=\"docker-compose-x.yml\" EARTHLY_COMPOSE_SERVICES=\"db\" /var/earthly/dockerd-wrapper.sh get-compose-config" did not complete successfully: exit code: 15 in +repro earthfile2llb group error: <nil> ============================= ❌ FAILURE [Build 🔧] ============================== Repeating the output of the command that caused the failure +repro *failed* | --> WITH DOCKER (docker-compose config) +repro *failed* | project name must not be empty +repro *failed* | ERROR Earthfile line 9:8 +repro *failed* | The command +repro *failed* | WITH DOCKER (docker-compose config) +repro *failed* | did not complete successfully.
Author   lalithsuresh
Discussions

How run docker-compose without project-name? - Stack Overflow
The project name can be overridden either by passing a -p / --project-name option for each command or setting the COMPOSE_PROJECT_NAME environment variable. Can I run docker-compose with an empty project-name? I declare the volume with the name: myvolume and I would like to have the name myvolume after starting the container and not ... More on stackoverflow.com
🌐 stackoverflow.com
Project name must not be empty
This time, however, I am seeing a "project name must not be empty" returned when i run docker compose up -d .env and yml attached I am running the compose command from the root of a drive (i:) that I want to store all my immich assets on. The .yml and .env are in that root folder. More on answeroverflow.com
🌐 answeroverflow.com
October 19, 2023
[BUG] using an empty compose file causes project name to be unset
We have defined the name top-level element in the initial docker-compose.yml file. Using this empty placeholder file at the end of the list seems to unset content from the other files resulting in the following: project name can't be empty. More on github.com
🌐 github.com
3
February 2, 2024
project name must not be empty
After configuration with the installer and pulling the container up the installation failed with "project name must not be empty" and prompt "installation complete!" In the docker-compose.yml I sim... More on github.com
🌐 github.com
4
February 11, 2025
🌐
Docker
docs.docker.com › manuals › docker compose › specify a project name
Specify a project name | Docker Docs
Project names must contain only lowercase letters, decimal digits, dashes, and underscores, and must begin with a lowercase letter or decimal digit. If the base name of the project directory or current directory violates this constraint, alternative ...
🌐
Answer Overflow
answeroverflow.com › m › 1164290858938531871
Project name must not be empty - Immich
October 19, 2023 - ... A place to hang out, get support, discuss Immich, get announcements about releases and anything else going on. ... ERROR: In file './docker-compose.yml', service 'name' must be a mapping not a string.
🌐
GitHub
github.com › docker › compose › issues › 11450
[BUG] using an empty compose file causes project name to be unset · Issue #11450 · docker/compose
February 2, 2024 - We have defined the name top-level element in the initial docker-compose.yml file. Using this empty placeholder file at the end of the list seems to unset content from the other files resulting in the following: project name can't be empty.
Author   designermonkey
🌐
GitHub
github.com › fosrl › pangolin › issues › 190
project name must not be empty · Issue #190 · fosrl/pangolin
February 11, 2025 - After configuration with the installer and pulling the container up the installation failed with "project name must not be empty" and prompt "installation complete!" In the docker-compose.yml I simply added a line on top with name:pangolin to fix it
Author   nukularexperte
🌐
Visual Studio Code
code.visualstudio.com › remote › advancedcontainers › set-docker-compose-project-name
Set Docker Compose project name
November 3, 2021 - The top-level property name in the docker-compose.yml can be used to set the project name. Alternatively, you can set the COMPOSE_PROJECT_NAME environment variable for the VS Code process, or specify it in a .env file in the same folder as the docker-compose.yml. Note: make sure to close all ...
Find elsewhere
🌐
GitHub
github.com › docker › compose › issues › 9741
docker compose restricts project name, where the spec does not · Issue #9741 · docker/compose
August 11, 2022 - Description As a follow up to #9216: docker compose denies creating projects with project names containing dots or uppercase letters. Looking at the compose spec, an arbitrary string can be provided as project name. There is no obvious r...
Author   simue
🌐
GitHub
github.com › docker › compose › issues › 1621
Proposal: support for empty project names · Issue #1621 · docker/compose
July 1, 2015 - Hi folks, I've been thinking about allowing empty project names (-p '') to compose. I simply want to have containers named blog_1, cache_1, db_1; not dirname_blog_1, dirname_cache_1, dirname_db_1. This can be done by allowing empty strin...
Author   ahmetb
🌐
Microsoft Learn
learn.microsoft.com › en-us › answers › questions › 896733 › docker-compose-deploy-image-cannot-be-empty
Docker Compose Deploy Image Cannot Be Empty - Microsoft Q&A
For acr, az acr repository list --name mycontainerregistry082 --output table ... I was not planning on using a container registry (at least while getting started). This article looks like its not needed? https://docs.docker.com/cloud/aci-integration/ 8 comments Show comments for this answer Report a concern ... You should have get the image from some repository for your docker compose.
🌐
JetBrains
youtrack.jetbrains.com › issue › PY-43850 › Docker-compose-Support-for-project-name-NAME-option
Docker-compose: Support for "--project-name NAME" option
{{ (>_<) }} This version of your browser is not supported. Try upgrading to the latest stable version. Something went seriously wrong
🌐
JetBrains
youtrack.jetbrains.com › issue › PY-61865 › Empty-project-name-for-Docker-Compose-interpreter-not-working
Empty project name for Docker Compose interpreter not ...
{{ (>_<) }} This version of your browser is not supported. Try upgrading to the latest stable version. Something went seriously wrong
🌐
GitHub
github.com › microsoft › vscode-containers › issues › 96
Issue with project name in `docker compose` · Issue #96 · microsoft/vscode-containers
May 31, 2025 - * Executing task: docker compose -f 'docker-compose.yaml' up -d --build project name must not be empty * The terminal process "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -Command docker compose -f 'docker-compose.yaml' up -d --build" terminated with exit code: 1.
Published   May 31, 2025
Author   SignalMQ
🌐
GitHub
github.com › dapr › dashboard › issues › 259
Project name must not be empty when running in docker compose · Issue #259 · dapr/dashboard
July 27, 2023 - dapr-dashboard: image: "daprio/dashboard:latest" command: [ "--docker-compose=true", "--components-path=/home/nonroot/dapr/components", "--config-path=/home/nonroot/dapr/config.yml", "--docker-compose-path=/home/nonroot/docker-compose.yml" ] ports: - "8080:8080" volumes: - "./dapr:/home/nonroot/dapr" - ./docker-compose.yml:/home/nonroot/docker-compose.yml networks: - dapr-network · I've tried looking for the source of the error but I'm coming up empty.
Author   sclarke81
🌐
Docker Docs
docs.docker.com › manuals › docker compose › use environment variables › configure pre-defined environment variables in docker compose
Configure pre-defined environment variables in Docker Compose | Docker Docs
February 24, 2023 - If the basename of the project directory or current directory violates this constraint, you must use one of the other mechanisms. See also using -p to specify a project name. Specifies the path to a Compose file. Specifying multiple Compose files is supported. Default behavior: If not provided, Compose looks for a file named compose.yaml in the current directory and, if not found, then Compose searches each parent directory recursively until a file by that name is found.
🌐
GitHub
github.com › earthly › earthly › issues › 3788
WITH DOCKER using compose gives "Project name not found" Issue #3788 · earthly/earthly
February 6, 2024 - What went wrong? earthly fails with "project name not found" +test-docker-compose *failed* | Repeating the failure error... +test-docker-compose *failed* | PLAYWRIGHT_SNAPSHOTS_COMMIT=884da15f2059021049cbcce8a9b3a75c2c4e0812 +test-docker...
Author   gz
🌐
GitHub
github.com › docker › compose › issues › 9519
docker-compose v2.6.0 "A" is not a valid project name · Issue #9519 · docker/compose
June 1, 2022 - Description docker-compose specifying a project name with capital letters fails. This was introduced in the most recent update from v2.5.1 -> v2.6.0. I assume this wasn't intended behaviour ...
Author   trent-abc
🌐
Yodi Aditya
yodiw.com › home › fix docker compose project name must not be empty docker-in-docker
Fix docker compose project name must not be empty Docker-in-Docker - Yodi Aditya
March 21, 2025 - docker compose up WARN[0000] /docker-compose.yaml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion project name must not be empty