Skip to content

Commit

Permalink
Add a note to warn the user about how to get rid of docker rate limit
Browse files Browse the repository at this point in the history
Signed-off-by: cmoulliard <[email protected]>
  • Loading branch information
cmoulliard committed Nov 20, 2024
1 parent 16b5407 commit cb5f5a3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,12 @@ and execute this command in a terminal:
```bash
mvn compile exec:java
```
**Important**: To avoid the `docker rate limit` error, set the following env var too
```bash
export REGISTRY_USERNAME="<REGISTRY_USERNAME>"
export REGISTRY_PASSWORD="<REGISTRY_PASSWORD>"
export REGISTRY_SERVER="docker.io"
```
### Jbang
Expand Down
7 changes: 7 additions & 0 deletions samples/build-me/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,11 @@ export IMAGE_REF=<IMAGE_REF> // quay.io/<ORG>/<IMAGE_NAME> or <IMAGE_NAME>
and execute this command in a terminal:
```bash
mvn compile exec:java
```

**Important**: To avoid the `docker rate limit` error, set the following env var too
```bash
export REGISTRY_USERNAME="<REGISTRY_USERNAME>"
export REGISTRY_PASSWORD="<REGISTRY_PASSWORD>"
export REGISTRY_SERVER="docker.io"
```
3 changes: 1 addition & 2 deletions samples/build-me/src/main/java/dev/snowdrop/BuildMe.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public static void main(String... args) {
String IMAGE_REF = System.getenv("IMAGE_REF");

String PROJECT_PATH = System.getenv("PROJECT_PATH");
File filePath = new File(PROJECT_PATH);

Map<String, String> envMap = new HashMap<>();
envMap.put("BP_JVM_VERSION", "21");
Expand All @@ -51,7 +50,7 @@ public static void main(String... args) {
.withLogger(new SystemLogger())
.withLogLevel("debug")
.and()
.addNewFileContentApplication(filePath)
.addNewFileContentApplication(new File(PROJECT_PATH))
.build()
.getExitCode();

Expand Down

0 comments on commit cb5f5a3

Please sign in to comment.