Closed
Description
Description
When I run the docker-compose up --build
command, I get an error: Error response from daemon: no such image: -app: invalid reference format
Later I realized that this error disappears when I remove build
from the app
service, for example if I replace the build
with any image
(just for testing purposes) everything works
Steps To Reproduce
Compose Version
Docker Compose version v2.15.1
Docker Environment
Client:
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc., v0.10.0)
compose: Docker Compose (Docker Inc., v2.15.1)
dev: Docker Dev Environments (Docker Inc., v0.0.5)
extension: Manages Docker extensions (Docker Inc., v0.2.17)
sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc., 0.6.0)
scan: Docker Scan (Docker Inc., v0.23.0)
Server:
Containers: 3
Running: 0
Paused: 0
Stopped: 3
Images: 3
Server Version: 20.10.22
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 9ba4b250366a5ddde94bb7c9d1def331423aa323
runc version: v1.1.4-0-g5fd4c4d
init version: de40ad0
Security Options:
seccomp
Profile: default
Kernel Version: 5.10.16.3-microsoft-standard-WSL2
Operating System: Docker Desktop
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 12.42GiB
Name: docker-desktop
ID: FQJF:OU7A:OT3K:XVFL:YFUW:BYMQ:E47N:R4XI:XZT5:U3L4:LUO2:N5XN
Docker Root Dir: /var/lib/docker
Debug Mode: false
HTTP Proxy: http.docker.internal:3128
HTTPS Proxy: http.docker.internal:3128
No Proxy: hubproxy.docker.internal
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
hubproxy.docker.internal:5000
127.0.0.0/8
Live Restore Enabled: false
WARNING: No blkio throttle.read_bps_device support
WARNING: No blkio throttle.write_bps_device support
WARNING: No blkio throttle.read_iops_device support
WARNING: No blkio throttle.write_iops_device support
Anything else?
version: '3.9'
services:
db:
image: mysql:8.0.23
restart: always
container_name: database
environment:
MYSQL_ROOT_PASSWORD: rootpassword
MYSQL_DATABASE: database_name
MYSQL_USER: username
MYSQL_PASSWORD: password
ports:
- 3306:3306
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: pma
links:
- db
environment:
PMA_HOST: db
PMA_PORT: 3306
PMA_ARBITRARY: 1
restart: always
ports:
- 9999:80
app:
build: .
container_name: web
restart: always
ports:
- 8080:8080
depends_on:
- db
environment:
SPRING_DATASOURCE_URL: jdbc:mysql://db:3306/database_name
SPRING_DATASOURCE_USERNAME: username
SPRING_DATASOURCE_PASSWORD: password
TELEGRAM_BOT_TOKEN: 5555555:scfsdfwsdf
TELEGRAM_CHAT_IDS: 123123