Skip to content

Commit b47786e

Browse files
committed
Merge branch 'develop' into update-from-template-merged
2 parents 7baf8f8 + b973ead commit b47786e

File tree

52 files changed

+5328
-41
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+5328
-41
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ body:
1515
attributes:
1616
label: "Checklist"
1717
options:
18-
- label: "I am able to reproduce the bug with the [latest version](https://github.com/xdev-software/template-placeholder/releases/latest)"
18+
- label: "I am able to reproduce the bug with the [latest version](https://github.com/xdev-software/testcontainers-advanced-imagebuilder/releases/latest)"
1919
required: true
20-
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/template-placeholder/issues) or [closed](https://github.com/xdev-software/template-placeholder/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
20+
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/testcontainers-advanced-imagebuilder/issues) or [closed](https://github.com/xdev-software/testcontainers-advanced-imagebuilder/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
2121
required: true
2222
- label: "I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise."
2323
required: true

.github/ISSUE_TEMPLATE/enhancement.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ body:
1313
attributes:
1414
label: "Checklist"
1515
options:
16-
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/template-placeholder/issues) or [closed](https://github.com/xdev-software/template-placeholder/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
16+
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/testcontainers-advanced-imagebuilder/issues) or [closed](https://github.com/xdev-software/testcontainers-advanced-imagebuilder/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
1717
required: true
1818
- label: "I have taken the time to fill in all the required details. I understand that the feature request will be dismissed otherwise."
1919
required: true

.github/ISSUE_TEMPLATE/question.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ body:
1212
attributes:
1313
label: "Checklist"
1414
options:
15-
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/template-placeholder/issues) or [closed](https://github.com/xdev-software/template-placeholder/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
15+
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/testcontainers-advanced-imagebuilder/issues) or [closed](https://github.com/xdev-software/testcontainers-advanced-imagebuilder/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
1616
required: true
1717
- label: "I have taken the time to fill in all the required details. I understand that the question will be dismissed otherwise."
1818
required: true

.github/workflows/check-build.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,15 @@ env:
2424

2525
jobs:
2626
build:
27-
runs-on: ubuntu-latest
2827
timeout-minutes: 30
2928

3029
strategy:
3130
matrix:
3231
java: [17, 21]
3332
distribution: [temurin]
34-
33+
os: [ubuntu-latest, windows-latest] # Windows is needed for recursive NTFS junctions
34+
35+
runs-on: ${{ matrix.os }}
3536
steps:
3637
- uses: actions/checkout@v5
3738

@@ -43,9 +44,10 @@ jobs:
4344
cache: 'maven'
4445

4546
- name: Build with Maven
46-
run: ./mvnw -B clean package
47+
run: ./mvnw -B clean package -P run-integration-tests -T2C
4748

4849
- name: Check for uncommited changes
50+
shell: bash
4951
run: |
5052
if [[ "$(git status --porcelain)" != "" ]]; then
5153
echo ----------------------------------------
@@ -63,13 +65,6 @@ jobs:
6365
exit 1
6466
fi
6567
66-
- name: Upload demo files
67-
uses: actions/upload-artifact@v4
68-
with:
69-
name: demo-files-java-${{ matrix.java }}
70-
path: ${{ env.DEMO_MAVEN_MODULE }}/target/${{ env.DEMO_MAVEN_MODULE }}.jar
71-
if-no-files-found: error
72-
7368
checkstyle:
7469
runs-on: ubuntu-latest
7570
if: ${{ github.event_name != 'pull_request' || !startsWith(github.head_ref, 'renovate/') }}

.run/Run Demo.run.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<component name="ProjectRunConfigurationManager">
22
<configuration default="false" name="Run Demo" type="Application" factoryName="Application">
33
<option name="MAIN_CLASS_NAME" value="software.xdev.Application" />
4-
<module name="template-placeholder-demo" />
4+
<module name="testcontainers-advanced-imagebuilder-demo" />
55
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
66
<extension name="coverage">
77
<pattern>

CHANGELOG.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# 2.2.1
2+
* Windows NTFS junction fix
3+
* Automatically disable it on Java 26+ as [JDK-8364277](https://bugs.openjdk.org/browse/JDK-8364277) is fixed there
4+
* Backport changes from Java 25 to ensure compatibility and get performance improvements (JEP 486)
5+
* Updated dependencies
6+
7+
# 2.2.0
8+
* Added an explicit option for enabling the Windows NTFS junction fix: ``useWinNTFSJunctionFixIfApplicable`` #155
9+
* Enabling it also requires adding ``--add-exports java.base/sun.nio.fs=ALL-UNNAMED`` or performance will be impacted by ~20x due to non-accessible file attributes cache
10+
* This option is temporary and will be removed once the [underlying JDK bug](https://bugs.openjdk.org/browse/JDK-8364277) was fixed
11+
* The default logger of ``AdvancedImageFromDockerFile`` now also includes ``dockerImageName`` to make it easier to distinguish between parallel builds
12+
13+
# 2.1.1
14+
* Addresses a JDK bug which results in a crash or "infinite" loop when encountering recursive NTFS junctions on Windows #155
15+
16+
# 2.1.0
17+
* Add customizer for ``TransferArchiveTARCompressor``
18+
* Create more predefined FileContentModifiers
19+
* This allows to e.g. remove not needed Maven modules when building
20+
21+
# 2.0.2
22+
* Don't try to pull reserved ``scratch`` image during build
23+
24+
# 2.0.1
25+
* Improve matching in ``DockerfileCOPYParentsEmulator`` #134
26+
* Now should properly handle ``./``
27+
28+
# 2.0.0
29+
* Changed ignore backend to utilize [JGit](https://github.com/eclipse-jgit/jgit)
30+
* This should now behave exactly like a ``.gitignore``
31+
* Overall performance should be a lot faster
32+
* Make it possible to modify transferred files
33+
* Provide an option to emulate [``COPY --parents``](https://docs.docker.com/reference/dockerfile/#copy---parents) using ``DockerfileCOPYParentsEmulator`` (which is currently not supported by Docker out of the box)
34+
* This option is required to utilize Docker's cache properly
35+
```docker
36+
# syntax=docker/dockerfile:1-labs
37+
# ...
38+
39+
# Copy & Cache wrapper
40+
COPY --parents mvnw .mvn/** ./
41+
RUN ./mvnw --version
42+
43+
# Copy & Cache poms/dependencies
44+
COPY --parents **/pom.xml ./
45+
# Resolve jars so that they can be cached and don't need to be downloaded when a Java file changes
46+
RUN ./mvnw -B dependency:go-offline -pl app -am -DincludeScope=runtime -T2C
47+
48+
# Copying all other files
49+
COPY . ./
50+
# Run the actual build
51+
RUN ./mvnw -B clean package -pl app -am -T2C -Dmaven.test.skip
52+
```
53+
* At ton of minor optimizations and improvements
54+
55+
# 1.2.0
56+
* Provide an option to always transfer specific paths
57+
* Always transfer Dockerfile - as it is required for building - by default
58+
59+
# 1.1.1
60+
* Migrated deployment to _Sonatype Maven Central Portal_ [#155](https://github.com/xdev-software/standard-maven-template/issues/155)
61+
62+
# 1.1.0
63+
* Remove testcontainer's dependency [onto JUnit 4](https://github.com/xdev-software/testcontainers-junit4-mock/?tab=readme-ov-file)
64+
* Updated dependencies
65+
66+
# 1.0.2
67+
* Do not pull images that are declared inside the Dockerfile (Multi-Stage build)
68+
69+
# 1.0.1
70+
* Minor improvements in cleanup behavior (backported from upstream)
71+
72+
# 1.0.0
73+
_Initial release_

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ You should have the following things installed:
3434
* Ensure that the JDK/Java-Version is correct
3535

3636

37-
## Releasing [![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/template-placeholder/release.yml?branch=master)](https://github.com/xdev-software/template-placeholder/actions/workflows/release.yml)
37+
## Releasing [![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/testcontainers-advanced-imagebuilder/release.yml?branch=master)](https://github.com/xdev-software/testcontainers-advanced-imagebuilder/actions/workflows/release.yml)
3838

3939
Before releasing:
40-
* Consider doing a [test-deployment](https://github.com/xdev-software/template-placeholder/actions/workflows/test-deploy.yml?query=branch%3Adevelop) before actually releasing.
40+
* Consider doing a [test-deployment](https://github.com/xdev-software/testcontainers-advanced-imagebuilder/actions/workflows/test-deploy.yml?query=branch%3Adevelop) before actually releasing.
4141
* Check the [changelog](CHANGELOG.md)
4242

4343
If the ``develop`` is ready for release, create a pull request to the ``master``-Branch and merge the changes

LICENSE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@
187187
identification within third-party archives.
188188

189189
Copyright 2024 XDEV Software
190+
Copyright 2023 Java Git Contributors
190191

191192
Licensed under the Apache License, Version 2.0 (the "License");
192193
you may not use this file except in compliance with the License.

README.md

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,26 @@
1-
[![Latest version](https://img.shields.io/maven-central/v/software.xdev/template-placeholder?logo=apache%20maven)](https://mvnrepository.com/artifact/software.xdev/template-placeholder)
2-
[![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/template-placeholder/check-build.yml?branch=develop)](https://github.com/xdev-software/template-placeholder/actions/workflows/check-build.yml?query=branch%3Adevelop)
1+
[![Latest version](https://img.shields.io/maven-central/v/software.xdev/testcontainers-advanced-imagebuilder?logo=apache%20maven)](https://mvnrepository.com/artifact/software.xdev/testcontainers-advanced-imagebuilder)
2+
[![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/testcontainers-advanced-imagebuilder/check-build.yml?branch=develop)](https://github.com/xdev-software/testcontainers-advanced-imagebuilder/actions/workflows/check-build.yml?query=branch%3Adevelop)
33

4-
# template-placeholder
4+
# Advanced Image-Builder for Testcontainers Java
55

6+
A re-implementation of [Testcontainers Image-Builder](https://java.testcontainers.org/features/creating_images/) with the following improvements:
7+
* Allows passing a custom logger to the image build - [testcontainers-java#3093](https://github.com/testcontainers/testcontainers-java/issues/3093)
8+
* Allows using ``ARG``s for ``FROM`` - [testcontainers-java#3238](https://github.com/testcontainers/testcontainers-java/issues/3238)
9+
* Brings a custom [build-context](https://docs.docker.com/build/building/context/) processor
10+
* Works more efficient and reliable than the default implementation because it utilizes [JGit](https://github.com/eclipse-jgit/jgit)
11+
* uses the ``.gitignore`` if available
12+
* Allows adding custom ignores
13+
* This way the build-context can be fine tuned in a way that the build cache works very efficiently (e.g. only re-built when actual code that matters changes)
14+
* Makes it possible to modify files that are transferred
15+
* Provide a compatibility layer to emulate [``COPY --parents``](https://docs.docker.com/reference/dockerfile/#copy---parents) (which is currently not supported by Docker out of the box)
16+
* Do not pull images that are declared inside the Dockerfile
17+
* Makes logger non generic and therefore controllable
18+
* Some general code cleanup and performance improvements
19+
20+
For more details have a look at [the demo](./testcontainers-advanced-imagebuilder-demo/src/main/java/software/xdev/Application.java).<br/>The demo showcases how an image for another application in the same repo can be built.
621

722
## Installation
8-
[Installation guide for the latest release](https://github.com/xdev-software/template-placeholder/releases/latest#Installation)
23+
[Installation guide for the latest release](https://github.com/xdev-software/testcontainers-advanced-imagebuilder/releases/latest#Installation)
924

1025
## Support
1126
If you need support as soon as possible and you can't wait for any pull request, feel free to use [our support](https://xdev.software/en/services/support).
@@ -14,4 +29,6 @@ If you need support as soon as possible and you can't wait for any pull request,
1429
See the [contributing guide](./CONTRIBUTING.md) for detailed instructions on how to get started with our project.
1530

1631
## Dependencies and Licenses
17-
View the [license of the current project](LICENSE) or the [summary including all dependencies](https://xdev-software.github.io/template-placeholder/dependencies)
32+
View the [license of the current project](LICENSE) or the [summary including all dependencies](https://xdev-software.github.io/testcontainers-advanced-imagebuilder/dependencies)
33+
34+
<sub>Disclaimer: This is not an official Testcontainers product and not associated</sub>

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
## Reporting a Vulnerability
44

5-
Please report a security vulnerability [on GitHub Security Advisories](https://github.com/xdev-software/template-placeholder/security/advisories/new).
5+
Please report a security vulnerability [on GitHub Security Advisories](https://github.com/xdev-software/testcontainers-advanced-imagebuilder/security/advisories/new).

0 commit comments

Comments
 (0)