generated from 2025/project_base
[Bug] cant run docker compose #36
Labels
No labels
ADMIN DASHBOARD TASKS
AUDIT SERVICE TASKS
ROLE-BASED ACCESS CONTROL
USER LIFECYCLE TASKS
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
2025/Group_2_IAM_SYSTEM#36
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows
PS C:\Users\luker\Documents\GitHub\Group_2_IAM_SYSTEM> docker compose -f deployments/docker-compose/docker-compose.yml up -d
time="2025-11-22T15:14:25Z" level=warning msg="C:\Users\luker\Documents\GitHub\Group_2_IAM_SYSTEM\deployments\docker-compose\docker-compose.yml: the attribute
versionis obsolete, it will be ignored, please remove it to avoid potential confusion"[+] Building 3.3s (12/13)
=> [internal] load local bake definitions 0.0s
=> => reading from stdin 1.23kB 0.0s
=> [auth-service internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 185B 0.0s
=> [user-service internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 185B 0.0s
=> [user-service internal] load metadata for docker.io/library/eclipse-temurin:21-jdk 1.4s
=> [auth] library/eclipse-temurin:pull token for registry-1.docker.io 0.0s
=> [auth-service internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [user-service internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [auth-service internal] load build context 0.0s
=> => transferring context: 2B 0.0s
=> CANCELED [user-service 1/3] FROM docker.io/library/eclipse-temurin:21-jdk@sha256:ec2005c536f3661c6ef1253292c9c623e582186749a3ef2ed90903d1aaf74640 0.4s
=> => resolve docker.io/library/eclipse-temurin:21-jdk@sha256:ec2005c536f3661c6ef1253292c9c623e582186749a3ef2ed90903d1aaf74640 0.0s
=> [user-service internal] load build context 0.0s
=> => transferring context: 2B 0.0s
=> CACHED [user-service 2/3] WORKDIR /app 0.0s
=> ERROR [auth-service 3/3] COPY target/auth-service-1.0-SNAPSHOT.jar app.jar 0.0s
=> ERROR [user-service 3/3] COPY target/user-service-1.0-SNAPSHOT.jar app.jar 0.0s
Dockerfile:5
3 | WORKDIR /app
4 |
5 | >>> COPY target/auth-service-1.0-SNAPSHOT.jar app.jar
6 |
7 | EXPOSE 8082
target auth-service: failed to solve: failed to compute cache key: failed to calculate checksum of ref g3rvpq7jfoh9kq7lmpxtpr2e8::ataultenmuvfncyo9pkvncbj7: "/target/auth-service-1.0-SNAPSHOT.jar": not found
PS C:\Users\luker\Documents\GitHub\Group_2_IAM_SYSTEM>
Root Cause
The Docker build is trying to copy JAR files that don't exist yet. Maven must compile and package the code before Docker can build the images.
Try THis:
Option 1: Command Line (Recommended for CI/CD)
Run these commands from the project root directory:
1. Build all services (creates JAR files in target/ directories)
mvn clean package -DskipTests
2. Build and start Docker containers
docker compose -f deployments/docker-compose/docker-compose.yml up -d
3. Verify all containers are running
docker compose -f deployments/docker-compose/docker-compose.yml ps
Option 2: IntelliJ IDE
Step 1: Open Maven Build Panel
Step 2: Build the Project
- Do NOT run tests: Right-click → Run with profile → Check "Skip Tests"
- Or use terminal command shown above
Step 3: Verify JAR Files Created
Step 4: Start Docker Compose
docker compose -f deployments/docker-compose/docker-compose.yml up -d
- Services tab (left) → Docker → Right-click docker-compose.yml → Compose Up
Step 5: Verify Containers
docker compose -f deployments/docker-compose/docker-compose.yml ps