Skip to content
New issue

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

fix: java 21 required in Docker run stage #136

Merged
merged 1 commit into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ COPY src ./src/
RUN gradle build --no-daemon --exclude-task test

# Please remove the "-alpine" suffix if you are running on a mac with Apple Silicon chip
FROM eclipse-temurin:17-jre-alpine
FROM eclipse-temurin:21-jre-alpine

COPY --from=builder /home/gradle/src/build/libs/train-delays-0.0.1-SNAPSHOT.jar /train-delays.jar

Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,22 @@ The build is tested with the following versions:
./gradlew clean build test --warning-mode all
```

### Build and Run the Docker Image

Build the Docker image:

```sh
docker build -t boos/train-delays .
```

Pass the environment variable `DB_API_KEY` and `CLIENT_ID` to the Docker container when running it:

```sh
export DB_API_KEY=your-api-key
export CLIENT_ID=your-client-id
docker run -p 8080:8080 --env DB_API_KEY=$DB_API_KEY --env CLIENT_ID=$CLIENT_ID boos/train-delays
```

## Before Creating a Pull Request

### Check Code Metrics
Expand Down
Loading