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 #34 - Windows based docker images for maven (jdk8 and jdk11 supported) #119

Closed
wants to merge 16 commits into from
Closed
58 changes: 50 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,26 @@ docker-maven
See [Docker Hub](https://hub.docker.com/_/maven) for updated list of tags

* [jdk-8](https://github.com/carlossg/docker-maven/blob/master/jdk-8/Dockerfile)
* [jdk-8-windows](https://github.com/carlossg/docker-maven/blob/master/jdk-8/Dockerfile.windows)
* [jdk-8-slim](https://github.com/carlossg/docker-maven/blob/master/jdk-8-slim/Dockerfile)
* [jdk-10](https://github.com/carlossg/docker-maven/blob/master/jdk-10/Dockerfile)
* [jdk-10-slim](https://github.com/carlossg/docker-maven/blob/master/jdk-10-slim/Dockerfile)
* [jdk-11](https://github.com/carlossg/docker-maven/blob/master/jdk-11/Dockerfile)
* [jdk-11-windows](https://github.com/carlossg/docker-maven/blob/master/jdk-11/Dockerfile.windows)
* [jdk-11-slim](https://github.com/carlossg/docker-maven/blob/master/jdk-11-slim/Dockerfile)
* [jdk-12](https://github.com/carlossg/docker-maven/blob/master/jdk-12/Dockerfile)
* [jdk-12-windows](https://github.com/carlossg/docker-maven/blob/master/jdk-12/Dockerfile.windows)
* [jdk-13](https://github.com/carlossg/docker-maven/blob/master/jdk-13/Dockerfile)
* [jdk-13-windows](https://github.com/carlossg/docker-maven/blob/master/jdk-13/Dockerfile.windows)
* [jdk-14](https://github.com/carlossg/docker-maven/blob/master/jdk-14/Dockerfile)
* [ibmjava-8](https://github.com/carlossg/docker-maven/blob/master/ibmjava-8/Dockerfile)
* [ibmjava-8-alpine](https://github.com/carlossg/docker-maven/blob/master/ibmjava-8-alpine/Dockerfile)
* [amazoncorretto-8](https://github.com/carlossg/docker-maven/blob/master/amazoncorretto-8/Dockerfile)
* [amazoncorretto-11](https://github.com/carlossg/docker-maven/blob/master/amazoncorretto-11/
* [azulzulu-11](https://github.com/carlossg/docker-maven/blob/master/azulzulu-11/
* [amazoncorretto-8-windows](https://github.com/carlossg/docker-maven/blob/master/amazoncorretto-8/Dockerfile.windows)
* [amazoncorretto-11](https://github.com/carlossg/docker-maven/blob/master/amazoncorretto-11/Dockerfile)
* [amazoncorretto-11-windows](https://github.com/carlossg/docker-maven/blob/master/amazoncorretto-11/Dockerfile.windows)
* [azulzulu-11](https://github.com/carlossg/docker-maven/blob/master/azulzulu-11/Dockerfile)
* [azulzulu-11-windows](https://github.com/carlossg/docker-maven/blob/master/azulzulu-11/Dockerfile.windows)

# What is Maven?

Expand All @@ -33,14 +40,28 @@ reporting and documentation from a central piece of information.
You can run a Maven project by using the Maven Docker image directly,
passing a Maven command to `docker run`:

### Linux

docker run -it --rm --name my-maven-project -v "$(pwd)":/usr/src/mymaven -w /usr/src/mymaven maven:3.3-jdk-8 mvn clean install

### Windows

```powershell
docker run -it --rm --name my-maven-project -v "$(Get-Location)":C:/Src -w C:/Src maven:3.3-jdk-8-windows mvn clean install
```

## Building local Docker image (optional)

This is a base image that you can extend, so it has the bare minimum packages needed. If you add custom package(s) to the `Dockerfile`, then you can build your local Docker image like this:

### Linux

docker build --tag my_local_maven:3.6.0-jdk-8 .

### Windows

docker build -f Dockerfile.windows --tag my_local_maven:3-jdk-9-windows --build-arg WINDOWS_DOCKER_TAG=1803 .


# Multi-stage Builds

Expand Down Expand Up @@ -75,12 +96,15 @@ Or you can just use your home .m2 cache directory that you share e.g. with your

# Packaging a local repository with the image

The `$MAVEN_CONFIG` dir (default to `/root/.m2`) could be configured as a volume so anything copied there in a Dockerfile at build time is lost.
For that reason the dir `/usr/share/maven/ref/` exists, and anything in that directory will be copied on container startup to `$MAVEN_CONFIG`.
The `$MAVEN_CONFIG` dir (default to `/root/.m2` or `C:\Users\ContainerAdministrator\.m2`) could be configured as a volume so anything copied there in a Dockerfile
at build time is lost. For that reason the dir `/usr/share/maven/ref/` (or `C:\ProgramData\Maven\Reference`) exists, and anything in that directory will be copied
on container startup to `$MAVEN_CONFIG`.

To create a pre-packaged repository, create a `pom.xml` with the dependencies you need and use this in your `Dockerfile`.
`/usr/share/maven/ref/settings-docker.xml` is a settings file that changes the local repository to `/usr/share/maven/ref/repository`,
but you can use your own settings file as long as it uses `/usr/share/maven/ref/repository` as local repo.
`/usr/share/maven/ref/settings-docker.xml` (`C:\ProgramData\Maven\Reference\settings-docker.xml`) is a settings file that
changes the local repository to `/usr/share/maven/ref/repository` (`C:\Programdata\Maven\Reference\repository`),
but you can use your own settings file as long as it uses `/usr/share/maven/ref/repository` (`C:\ProgramData\Maven\Reference\repository`)
as local repo.

COPY pom.xml /tmp/pom.xml
RUN mvn -B -f /tmp/pom.xml -s /usr/share/maven/ref/settings-docker.xml dependency:resolve
Expand All @@ -92,7 +116,7 @@ To add your custom `settings.xml` file to the image use
For an example, check the `tests` dir


# Running as non-root
# Running as non-root (not supported on Windows)

Maven needs the user home to download artifacts to, and if the user does not exist in the image an extra
`user.home` Java property needs to be set.
Expand All @@ -116,15 +140,29 @@ Build with the usual

docker build -t maven .

Tests are written using [bats](https://github.com/sstephenson/bats) under the `tests` dir.
Tests are written using [bats](https://github.com/sstephenson/bats) for Linux images and [pester](https://github.com/pester/Pester) for Windows images
(requires Pester 4.x) under the `tests` dir.

Use the env var TAG to choose what image to run tests against.

### Linux
TAG=jdk-11 bats tests

### Windows
```powershell
$env:TAG="jdk-11" ; Invoke-Pester -Path tests
```

or run all the tests with

### Linux
for dir in $(/bin/ls -1 -d */ | grep -v tests); do TAG=$(basename $dir) bats tests; done

### Windows
```powershell
Get-ChildItem -Directory -Exclude tests,ibm*,*slim | ForEach-Object { Push-Location ; $env:TAG=$_.Name ; Invoke-Pester -Path tests ; Pop-Location }
```

Bats can be easily installed with `brew install bats` on OS X.

Note that you may first need to:
Expand All @@ -134,6 +172,10 @@ git submodule init
git submodule update
```


Pester comes with most modern Windows (Windows 10 and Windows Server 2019), but is an older version than required. You may need to follow [this tutorial](https://blog.damianflynn.com/Windows10-Pester/) on upgrading Pester to 4.x.


## Publishing to Docker Hub

In order to publish the images a PR needs to be opened against [docker-library/official-images](https://github.com/docker-library/official-images)
Expand Down
46 changes: 46 additions & 0 deletions amazoncorretto-11/Dockerfile.windows
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# escape=`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For lack of highlighting, see github-linguist/linguist#4566 (comment).

ARG WINDOWS_DOCKER_TAG=ltsc2019
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL

FROM mcr.microsoft.com/windows/servercore:$WINDOWS_DOCKER_TAG

SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

ARG zip=amazon-corretto-11.0.4.11.1-windows-x64.zip
ARG uri=https://d3pxv6yz143wms.cloudfront.net/11.0.4.11.1/
ARG hash=707c839c3f56645454b8c8d31f255161

RUN Invoke-WebRequest -Uri $('{0}{1}' -f $env:uri,$env:zip) -OutFile C:/$env:zip ; `
if((Get-FileHash C:/$env:zip -Algorithm MD5).Hash.ToLower() -ne $env:hash) { exit 1 } ; `
Expand-Archive -Path C:/$env:zip -Destination C:/ProgramData ; `
Remove-Item C:/${env:zip}

ENV JAVA_HOME=C:/ProgramData/jdk11.0.4_10


ARG MAVEN_VERSION=3.6.1
ARG USER_HOME_DIR="C:/Users/ContainerAdministrator"
ARG SHA=51169366d7269ed316bad013d9cbfebe3a4ef1fda393ac4982d6dbc9af2d5cc359ee12838b8041cb998f236486e988b9c05372f4fdb29a96c1139f63c991e90e
ARG BASE_URL=https://apache.osuosl.org/maven/maven-3/${MAVEN_VERSION}/binaries

RUN Invoke-WebRequest -Uri ${env:BASE_URL}/apache-maven-${env:MAVEN_VERSION}-bin.zip -OutFile ${env:TEMP}/apache-maven.zip ; `
if((Get-FileHash -Algorithm SHA512 -Path ${env:TEMP}/apache-maven.zip).Hash.ToLower() -ne ${env:SHA}) { exit 1 } ; `
Expand-Archive -Path ${env:TEMP}/apache-maven.zip -Destination C:/ProgramData ; `
Move-Item C:/ProgramData/apache-maven-${env:MAVEN_VERSION} C:/ProgramData/Maven ; `
New-Item -ItemType Directory -Path C:/ProgramData/Maven/Reference | Out-Null ; `
Remove-Item ${env:TEMP}/apache-maven.zip

ENV MAVEN_HOME C:/ProgramData/Maven
ENV MAVEN_CONFIG "$USER_HOME_DIR/.m2"

# Workaround https://github.com/corretto/corretto-8-docker/pull/32
#ENV JAVA_HOME=/usr/lib/jvm/java-1.8.0-amazon-corretto

COPY mvn-entrypoint.ps1 C:/ProgramData/Maven/mvn-entrypoint.ps1
COPY settings-docker.xml C:/ProgramData/Maven/Reference/settings-docker.xml
RUN $content = Get-Content "C:/ProgramData/Maven/Reference/settings-docker.xml" ; `
$content | ForEach-Object { $_ -replace '/usr/share/maven/ref/repository','C:\ProgramData\Maven\Reference\repository' } | `
Set-Content -Path "C:/ProgramData/Maven/Reference/settings-docker.xml"

RUN setx /M PATH $('{0};{1}' -f $env:PATH,'C:\ProgramData\Maven\bin') | Out-Null

ENTRYPOINT ["powershell.exe", "-f", "C:/ProgramData/Maven/mvn-entrypoint.ps1"]
CMD ["mvn"]
49 changes: 49 additions & 0 deletions amazoncorretto-11/mvn-entrypoint.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@

# Copy files from C:/ProgramData/Maven/Reference into ${MAVEN_CONFIG}
# So the initial ~/.m2 is set with expected content.
# Don't override, as this is just a reference setup

function Copy-ReferenceFiles() {
$log = "${env:MAVEN_CONFIG}/copy_reference_file.log"
$ref = "C:/ProgramData/Maven/Reference"

$repo = Join-Path $env:MAVEN_CONFIG 'repository'

New-Item -Path $repo -ItemType Directory -Force | Out-Null
Write-Output $null > $log
if((Test-Path $repo) -and (Test-Path $log)) {
$count = (Get-ChildItem $repo | Measure-Object).Count
if($count -eq 0) {
# destination is empty...
Add-Content -Path $log -Value "--- Copying all files to ${env:MAVEN_CONFIG} at $(Get-Date)"
Copy-Item -Path "$ref\*" -Destination $env:MAVEN_CONFIG -Force -Recurse | Add-Content -Path $log
} else {
# destination is non-empty, copy file-by-file
Add-Content -Path $log -Value "--- Copying individual files to ${MAVEN_CONFIG} at $(Get-Date)"
Get-ChildItem -Path $ref -File | ForEach-Object {
Push-Location $ref
$rel = Resolve-Path -Path $($_.FullName) -Relative
Pop-Location
if(!(Test-Path (Join-Path $env:MAVEN_CONFIG $rel)) -or (Test-Path $('{0}.override' -f $_.FullName))) {
$dir = Join-Path $env:MAVEN_CONFIG $($rel.DirectoryName)
if(!(Test-Path $dir)) {
New-Item -Path $dir -ItemType Directory | Out-Null
}
Copy-Item -Path $_.FullName -Destination (Join-Path $env:MAVEN_CONFIG $rel) | Add-Content -Path $log
}
}
}
Add-Content -Path $log -Value ""
} else {
Write-Warning "Can not write to ${log}. Wrong volume permissions? Carrying on ..."
}
}

Push-Location -StackName 'maven-entrypoint'
Copy-ReferenceFiles
Pop-Location -StackName 'maven-entrypoint'

Remove-Item Env:\MAVEN_CONFIG

Invoke-Expression "$args"
exit $lastExitCode
46 changes: 46 additions & 0 deletions amazoncorretto-8/Dockerfile.windows
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# escape=`
ARG WINDOWS_DOCKER_TAG=ltsc2019
FROM mcr.microsoft.com/windows/servercore:$WINDOWS_DOCKER_TAG

SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

ARG zip=amazon-corretto-8.222.10.3-windows-x64-jdk.zip
ARG uri=https://d3pxv6yz143wms.cloudfront.net/8.222.10.1/
ARG hash=9879a7f69c0bd7d8c1bbb916df7b5f82

RUN Invoke-WebRequest -Uri $('{0}{1}' -f $env:uri,$env:zip) -OutFile C:/$env:zip ; `
if((Get-FileHash C:/$env:zip -Algorithm MD5).Hash.ToLower() -ne $env:hash) { exit 1 } ; `
Expand-Archive -Path C:/$env:zip -Destination C:/ProgramData ; `
Remove-Item C:/${env:zip}

ENV JAVA_HOME=C:/ProgramData/jdk1.8.0_222


ARG MAVEN_VERSION=3.6.1
ARG USER_HOME_DIR="C:/Users/ContainerAdministrator"
ARG SHA=51169366d7269ed316bad013d9cbfebe3a4ef1fda393ac4982d6dbc9af2d5cc359ee12838b8041cb998f236486e988b9c05372f4fdb29a96c1139f63c991e90e
ARG BASE_URL=https://apache.osuosl.org/maven/maven-3/${MAVEN_VERSION}/binaries

RUN Invoke-WebRequest -Uri ${env:BASE_URL}/apache-maven-${env:MAVEN_VERSION}-bin.zip -OutFile ${env:TEMP}/apache-maven.zip ; `
if((Get-FileHash -Algorithm SHA512 -Path ${env:TEMP}/apache-maven.zip).Hash.ToLower() -ne ${env:SHA}) { exit 1 } ; `
Expand-Archive -Path ${env:TEMP}/apache-maven.zip -Destination C:/ProgramData ; `
Move-Item C:/ProgramData/apache-maven-${env:MAVEN_VERSION} C:/ProgramData/Maven ; `
New-Item -ItemType Directory -Path C:/ProgramData/Maven/Reference | Out-Null ; `
Remove-Item ${env:TEMP}/apache-maven.zip
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yow, a lot of duplicated content between images. Is there a straightforward way to share some of these steps?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I agree. I am not a super user with docker, so I am not aware of any tricks for sharing content. I based my implementation on the existing image setup.


ENV MAVEN_HOME C:/ProgramData/Maven
ENV MAVEN_CONFIG "$USER_HOME_DIR/.m2"

# Workaround https://github.com/corretto/corretto-8-docker/pull/32
#ENV JAVA_HOME=/usr/lib/jvm/java-1.8.0-amazon-corretto

COPY mvn-entrypoint.ps1 C:/ProgramData/Maven/mvn-entrypoint.ps1
COPY settings-docker.xml C:/ProgramData/Maven/Reference/settings-docker.xml
RUN $content = Get-Content "C:/ProgramData/Maven/Reference/settings-docker.xml" ; `
$content | ForEach-Object { $_ -replace '/usr/share/maven/ref/repository','C:\ProgramData\Maven\Reference\repository' } | `
Set-Content -Path "C:/ProgramData/Maven/Reference/settings-docker.xml"

RUN setx /M PATH $('{0};{1}' -f $env:PATH,'C:\ProgramData\Maven\bin') | Out-Null

ENTRYPOINT ["powershell.exe", "-f", "C:/ProgramData/Maven/mvn-entrypoint.ps1"]
CMD ["mvn"]
49 changes: 49 additions & 0 deletions amazoncorretto-8/mvn-entrypoint.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@

# Copy files from C:/ProgramData/Maven/Reference into ${MAVEN_CONFIG}
# So the initial ~/.m2 is set with expected content.
# Don't override, as this is just a reference setup

function Copy-ReferenceFiles() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, we should not have a dozen copies of the same script.

Perhaps it would be better to refactor the repository layout to use a flat structure, so that any Dockerfile.* could freely COPY any resource file (perhaps just a temporary script to RUN and delete).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the mvn-entrypoint.sh is copied across the various image directories as well, this is because Docker doesn't support COPY from outside the current directory (and children) into the image. I'm sure there could be some refactoring to take that into account, but I didn't want to make that part of this changset.

Copy link
Contributor

@jglick jglick Aug 23, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cleaning up an existing situation is indeed something that should be deferred to a separate PR. I mentioned this here because this PR introduces a lot of duplication.

Perhaps we could start by introducing a single directory with all the Windows images, and leave the Linux images untouched for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm definitely open to that method if that is desired. I'd also like to know if that would work for @carlossg to have that method.

$log = "${env:MAVEN_CONFIG}/copy_reference_file.log"
$ref = "C:/ProgramData/Maven/Reference"

$repo = Join-Path $env:MAVEN_CONFIG 'repository'

New-Item -Path $repo -ItemType Directory -Force | Out-Null
Write-Output $null > $log
if((Test-Path $repo) -and (Test-Path $log)) {
$count = (Get-ChildItem $repo | Measure-Object).Count
if($count -eq 0) {
# destination is empty...
Add-Content -Path $log -Value "--- Copying all files to ${env:MAVEN_CONFIG} at $(Get-Date)"
Copy-Item -Path "$ref\*" -Destination $env:MAVEN_CONFIG -Force -Recurse | Add-Content -Path $log
} else {
# destination is non-empty, copy file-by-file
Add-Content -Path $log -Value "--- Copying individual files to ${MAVEN_CONFIG} at $(Get-Date)"
Get-ChildItem -Path $ref -File | ForEach-Object {
Push-Location $ref
$rel = Resolve-Path -Path $($_.FullName) -Relative
Pop-Location
if(!(Test-Path (Join-Path $env:MAVEN_CONFIG $rel)) -or (Test-Path $('{0}.override' -f $_.FullName))) {
$dir = Join-Path $env:MAVEN_CONFIG $($rel.DirectoryName)
if(!(Test-Path $dir)) {
New-Item -Path $dir -ItemType Directory | Out-Null
}
Copy-Item -Path $_.FullName -Destination (Join-Path $env:MAVEN_CONFIG $rel) | Add-Content -Path $log
}
}
}
Add-Content -Path $log -Value ""
} else {
Write-Warning "Can not write to ${log}. Wrong volume permissions? Carrying on ..."
}
}

Push-Location -StackName 'maven-entrypoint'
Copy-ReferenceFiles
Pop-Location -StackName 'maven-entrypoint'

Remove-Item Env:\MAVEN_CONFIG

Invoke-Expression "$args"
exit $lastExitCode
46 changes: 46 additions & 0 deletions azulzulu-11/Dockerfile.windows
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# escape=`
ARG WINDOWS_DOCKER_TAG=ltsc2019
FROM mcr.microsoft.com/windows/servercore:$WINDOWS_DOCKER_TAG

SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

ARG zip=zulu11.33.15-ca-jdk11.0.4-win_x64.zip
ARG uri=https://cdn.azul.com/zulu/bin/
ARG hash=ae13f3de1e7be9b3aa8d0afbfd5f2f9d6aba356276a39ccfcaf3511feb860f05

RUN Invoke-WebRequest -Uri $('{0}{1}' -f $env:uri,$env:zip) -OutFile C:/$env:zip ; `
if((Get-FileHash C:/$env:zip -Algorithm SHA256).Hash.ToLower() -ne $env:hash) { exit 1 } ; `
Expand-Archive -Path C:/$env:zip -Destination C:/ProgramData ; `
Remove-Item C:/${env:zip}

ENV JAVA_HOME=C:/ProgramData/zulu11.33.15-ca-jdk11.0.4-win_x64


ARG MAVEN_VERSION=3.6.1
ARG USER_HOME_DIR="C:/Users/ContainerAdministrator"
ARG SHA=51169366d7269ed316bad013d9cbfebe3a4ef1fda393ac4982d6dbc9af2d5cc359ee12838b8041cb998f236486e988b9c05372f4fdb29a96c1139f63c991e90e
ARG BASE_URL=https://apache.osuosl.org/maven/maven-3/${MAVEN_VERSION}/binaries

RUN Invoke-WebRequest -Uri ${env:BASE_URL}/apache-maven-${env:MAVEN_VERSION}-bin.zip -OutFile ${env:TEMP}/apache-maven.zip ; `
if((Get-FileHash -Algorithm SHA512 -Path ${env:TEMP}/apache-maven.zip).Hash.ToLower() -ne ${env:SHA}) { exit 1 } ; `
Expand-Archive -Path ${env:TEMP}/apache-maven.zip -Destination C:/ProgramData ; `
Move-Item C:/ProgramData/apache-maven-${env:MAVEN_VERSION} C:/ProgramData/Maven ; `
New-Item -ItemType Directory -Path C:/ProgramData/Maven/Reference | Out-Null ; `
Remove-Item ${env:TEMP}/apache-maven.zip

ENV MAVEN_HOME C:/ProgramData/Maven
ENV MAVEN_CONFIG "$USER_HOME_DIR/.m2"

# Workaround https://github.com/corretto/corretto-8-docker/pull/32
#ENV JAVA_HOME=/usr/lib/jvm/java-1.8.0-amazon-corretto

COPY mvn-entrypoint.ps1 C:/ProgramData/Maven/mvn-entrypoint.ps1
COPY settings-docker.xml C:/ProgramData/Maven/Reference/settings-docker.xml
RUN $content = Get-Content "C:/ProgramData/Maven/Reference/settings-docker.xml" ; `
$content | ForEach-Object { $_ -replace '/usr/share/maven/ref/repository','C:\ProgramData\Maven\Reference\repository' } | `
Set-Content -Path "C:/ProgramData/Maven/Reference/settings-docker.xml"

RUN setx /M PATH $('{0};{1}' -f $env:PATH,'C:\ProgramData\Maven\bin') | Out-Null

ENTRYPOINT ["powershell.exe", "-f", "C:/ProgramData/Maven/mvn-entrypoint.ps1"]
CMD ["mvn"]
Loading