We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Within the docker-compose.yml
name: ${PROJECT} services:
While any other property accepts ${VARIABLES} from .env, the name property shows the error:
String does not match the pattern of "^[a-z0-9][a-z0-9_-]*$".yaml-schema: docker-compose.yml Source: compose-spec.json
String does not match the pattern of "^[a-z0-9][a-z0-9_-]*$".yaml-schema: docker-compose.yml
The variable still works, and the containers do open under the project name specified in the .env file - The error is in the linting itself
Create a .env file with a variable defined for the compose project name
PROJECT=project-name
Create a compose yml with the top-level name property set to a .env variable
name: ${PROJECT} ...
Run the compose docker compose up
docker compose up
The container will open under the project defined in .env, but the YML file will show the error described above
Docker Compose version v2.26.1-desktop.1
docker-compose version 1.29.2, build 5becea4 docker-py version: 5.0.0 CPython version: 3.7.10 OpenSSL version: OpenSSL 1.1.0l 10 Sep 2019
(Using docker compose)
Client: Docker Engine - Community Version: 26.1.0 Context: default Debug Mode: false Plugins: buildx: Docker Buildx (Docker Inc.) Version: v0.13.1-desktop.1 Path: /usr/lib/docker/cli-plugins/docker-buildx compose: Docker Compose (Docker Inc.) Version: v2.26.1-desktop.1 Path: /usr/lib/docker/cli-plugins/docker-compose debug: Get a shell into any image or container. (Docker Inc.) Version: 0.0.27 Path: /usr/lib/docker/cli-plugins/docker-debug dev: Docker Dev Environments (Docker Inc.) Version: v0.1.2 Path: /usr/lib/docker/cli-plugins/docker-dev extension: Manages Docker extensions (Docker Inc.) Version: v0.2.23 Path: /usr/lib/docker/cli-plugins/docker-extension feedback: Provide feedback, right in your terminal! (Docker Inc.) Version: v1.0.4 Path: /usr/lib/docker/cli-plugins/docker-feedback init: Creates Docker-related starter files for your project (Docker Inc.) Version: v1.1.0 Path: /usr/lib/docker/cli-plugins/docker-init sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.) Version: 0.6.0 Path: /usr/lib/docker/cli-plugins/docker-sbom scout: Docker Scout (Docker Inc.) Version: v1.6.3 Path: /usr/lib/docker/cli-plugins/docker-scout Server: Containers: 7 Running: 2 Paused: 0 Stopped: 5 Images: 60 Server Version: 26.1.0 Storage Driver: overlay2 Backing Filesystem: extfs Supports d_type: true Using metacopy: false Native Overlay Diff: true userxattr: false Logging Driver: json-file Cgroup Driver: systemd Cgroup Version: 2 Plugins: Volume: local Network: bridge host ipvlan macvlan null overlay Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog Swarm: inactive Runtimes: runc io.containerd.runc.v2 Default Runtime: runc Init Binary: docker-init containerd version: e377cd56a71523140ca6ae87e30244719194a521 runc version: v1.1.12-0-g51d5e94 init version: de40ad0 Security Options: apparmor seccomp Profile: builtin cgroupns Kernel Version: 6.8.0-76060800daily20240311-generic Operating System: Pop!_OS 22.04 LTS OSType: linux Architecture: x86_64 CPUs: 12 Total Memory: 31.19GiB Name: dean-pop ID: abfda37a-4a3a-43c6-9e29-524ea89c51c6 Docker Root Dir: /var/lib/docker Debug Mode: false Username: jackdeaniels Experimental: false Insecure Registries: 127.0.0.0/8 Live Restore Enabled: false
The text was updated successfully, but these errors were encountered:
My apologies, the enter key simply posted the issue.... Editing the post -_-
Sorry, something went wrong.
Trying to change user to verdaccio in dockerfile - Crashes the container
5edbd4a
Reached out to verdaccio Discord https://discord.com/channels/388674437219745793/1235628971224465478 Docker-compose linting error, issue opened: docker/compose#11787
Docker compose project name variable interpolation awaiting fix
94117ea
See docker/compose#11787 Added default variable values
No branches or pull requests
Description
Within the docker-compose.yml
While any other property accepts ${VARIABLES} from .env, the name property shows the error:
String does not match the pattern of "^[a-z0-9][a-z0-9_-]*$".yaml-schema: docker-compose.yml
Source: compose-spec.json
The variable still works, and the containers do open under the project name specified in the .env file - The error is in the linting itself
Steps To Reproduce
Create a .env file with a variable defined for the compose project name
Create a compose yml with the top-level name property set to a .env variable
Run the compose
docker compose up
The container will open under the project defined in .env, but the YML file will show the error described above
Compose Version
Docker Compose version v2.26.1-desktop.1
docker-compose version 1.29.2, build 5becea4
docker-py version: 5.0.0
CPython version: 3.7.10
OpenSSL version: OpenSSL 1.1.0l 10 Sep 2019
(Using docker compose)
Docker Environment
The text was updated successfully, but these errors were encountered: