diff --git a/.github/workflows/openjdk-11-nanoserver.yml b/.github/workflows/openjdk-11-nanoserver.yml deleted file mode 100644 index 58a4106c..00000000 --- a/.github/workflows/openjdk-11-nanoserver.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: openjdk-11-nanoserver - -on: - push: - paths: - - "openjdk-11-nanoserver/**" - - "tests/**" - - github-action.ps1 - - "!tests/*.bats" - - "!tests/*.bash" - - "!tests/Dockerfile" - - .github/workflows/_template_windows.yml - pull_request: - paths: - - "openjdk-11-nanoserver/**" - - "tests/**" - - github-action.ps1 - - "!tests/*.bash" - - "!tests/Dockerfile" - - .github/workflows/_template_windows.yml - -env: - DOCKER_PUSH: "true" - -jobs: - build: - uses: ./.github/workflows/_template_windows.yml - with: - directory: openjdk-11-nanoserver - secrets: inherit diff --git a/.github/workflows/openjdk-11-windowsservercore.yml b/.github/workflows/openjdk-11-windowsservercore.yml deleted file mode 100644 index 65e1450a..00000000 --- a/.github/workflows/openjdk-11-windowsservercore.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: openjdk-11-windowsservercore - -on: - push: - paths: - - "openjdk-11-windowsservercore/**" - - "tests/**" - - github-action.ps1 - - "!tests/*.bats" - - "!tests/*.bash" - - "!tests/Dockerfile" - - .github/workflows/_template_windows.yml - pull_request: - paths: - - "openjdk-11-windowsservercore/**" - - "tests/**" - - github-action.ps1 - - "!tests/*.bash" - - "!tests/Dockerfile" - - .github/workflows/_template_windows.yml - -env: - DOCKER_PUSH: "true" - -jobs: - build: - uses: ./.github/workflows/_template_windows.yml - with: - directory: openjdk-11-windowsservercore - secrets: inherit diff --git a/.github/workflows/openjdk-8-nanoserver.yml b/.github/workflows/openjdk-8-nanoserver.yml deleted file mode 100644 index dd342c4f..00000000 --- a/.github/workflows/openjdk-8-nanoserver.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: openjdk-8-nanoserver - -on: - push: - paths: - - "openjdk-8-nanoserver/**" - - "tests/**" - - github-action.ps1 - - "!tests/*.bats" - - "!tests/*.bash" - - "!tests/Dockerfile" - - .github/workflows/_template_windows.yml - pull_request: - paths: - - "openjdk-8-nanoserver/**" - - "tests/**" - - github-action.ps1 - - "!tests/*.bash" - - "!tests/Dockerfile" - - .github/workflows/_template_windows.yml - -env: - DOCKER_PUSH: "true" - -jobs: - build: - uses: ./.github/workflows/_template_windows.yml - with: - directory: openjdk-8-nanoserver - secrets: inherit diff --git a/.github/workflows/openjdk-8-windowsservercore.yml b/.github/workflows/openjdk-8-windowsservercore.yml deleted file mode 100644 index a147c5ab..00000000 --- a/.github/workflows/openjdk-8-windowsservercore.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: openjdk-8-windowsservercore - -on: - push: - paths: - - "openjdk-8-windowsservercore/**" - - "tests/**" - - github-action.ps1 - - "!tests/*.bats" - - "!tests/*.bash" - - "!tests/Dockerfile" - - .github/workflows/_template_windows.yml - pull_request: - paths: - - "openjdk-8-windowsservercore/**" - - "tests/**" - - github-action.ps1 - - "!tests/*.bash" - - "!tests/Dockerfile" - - .github/workflows/_template_windows.yml - -env: - DOCKER_PUSH: "true" - -jobs: - build: - uses: ./.github/workflows/_template_windows.yml - with: - directory: openjdk-8-windowsservercore - secrets: inherit diff --git a/README.md b/README.md index f609e6b4..67794f9f 100644 --- a/README.md +++ b/README.md @@ -94,10 +94,6 @@ Only under `csanchez/maven` and `ghcr.io/carlossg/maven`: See Docker Hub [`csanchez/maven`](https://hub.docker.com/r/csanchez/maven) for an updated list of tags -* ~~[openjdk-8-windowsservercore-1809](https://github.com/carlossg/docker-maven/blob/main/openjdk-8-windowsservercore/Dockerfile)~~ [(deprecated)](https://github.com/docker-library/openjdk?tab=readme-ov-file#deprecated) -* ~~[openjdk-8-nanoserver](https://github.com/carlossg/docker-maven/blob/main/openjdk-8-nanoserver/Dockerfile)~~ [(deprecated)](https://github.com/docker-library/openjdk?tab=readme-ov-file#deprecated) -* ~~[openjdk-11-windowsservercore-1809](https://github.com/carlossg/docker-maven/blob/main/openjdk-11-windowsservercore/Dockerfile)~~ [(deprecated)](https://github.com/docker-library/openjdk?tab=readme-ov-file#deprecated) -* ~~[openjdk-11-nanoserver](https://github.com/carlossg/docker-maven/blob/main/openjdk-11-nanoserver/Dockerfile)~~ [(deprecated)](https://github.com/docker-library/openjdk?tab=readme-ov-file#deprecated) * [amazoncorretto-8-windowsservercore-1809](https://github.com/carlossg/docker-maven/blob/main/amazoncorretto-8-windowsservercore/Dockerfile) * [amazoncorretto-11-windowsservercore-1809](https://github.com/carlossg/docker-maven/blob/main/amazoncorretto-11-windowsservercore/Dockerfile) * [amazoncorretto-17-windowsservercore-1809](https://github.com/carlossg/docker-maven/blob/main/amazoncorretto-17-windowsservercore/Dockerfile) @@ -258,21 +254,21 @@ Some come from the parent images and some are installed in this image for backwa | azulzulu-23 | | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | ✔︎ | | azulzulu-23-alpine | | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | ✔︎ | | azulzulu-23-debian | | | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | | ✔︎ | -| eclipse-temurin-8 | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | ✔︎ | -| eclipse-temurin-8-alpine | | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | ✔︎ | -| eclipse-temurin-8-focal | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | ✔︎ | -| eclipse-temurin-11 | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | ✔︎ | -| eclipse-temurin-11-alpine | | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | ✔︎ | -| eclipse-temurin-11-focal | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | ✔︎ | -| eclipse-temurin-17 | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | ✔︎ | -| eclipse-temurin-17-alpine | | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | ✔︎ | -| eclipse-temurin-17-focal | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | ✔︎ | -| eclipse-temurin-21 | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | ✔︎ | -| eclipse-temurin-21-alpine | | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | ✔︎ | -| eclipse-temurin-21-jammy | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | ✔︎ | -| eclipse-temurin-23 | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | ✔︎ | -| eclipse-temurin-23-alpine | | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | ✔︎ | -| eclipse-temurin-23-noble | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | ✔︎ | +| eclipse-temurin-8 | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | +| eclipse-temurin-8-alpine | | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | +| eclipse-temurin-8-focal | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | +| eclipse-temurin-11 | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | +| eclipse-temurin-11-alpine | | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | +| eclipse-temurin-11-focal | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | +| eclipse-temurin-17 | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | +| eclipse-temurin-17-alpine | | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | +| eclipse-temurin-17-focal | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | +| eclipse-temurin-21 | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | +| eclipse-temurin-21-alpine | | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | +| eclipse-temurin-21-jammy | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | +| eclipse-temurin-23 | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | +| eclipse-temurin-23-alpine | | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | +| eclipse-temurin-23-noble | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | graalvm-community-17 | | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | ✔︎ | ✔︎ | | graalvm-community-21 | | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | ✔︎ | ✔︎ | | graalvm-community-23 | | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | ✔︎ | ✔︎ | diff --git a/amazoncorretto-11-windowsservercore/Dockerfile b/amazoncorretto-11-windowsservercore/Dockerfile index 91ce1297..6f590998 100644 --- a/amazoncorretto-11-windowsservercore/Dockerfile +++ b/amazoncorretto-11-windowsservercore/Dockerfile @@ -10,14 +10,14 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPref ARG zip=amazon-corretto-11-x64-windows-jdk.zip ARG uri=https://corretto.aws/downloads/latest -ARG hash=26f3d4ffcd3c59f9e5f620d9c99dd66c54c89e02f0df1153f243e9597243eade +ARG hash=98bef58c1d8579f0a0043cd7aeb1eb7bb0af43d71e76f977e35be1c59a6fa9c1 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/jdk11.0.24_8 +ENV JAVA_HOME=C:/ProgramData/jdk11.0.25_9 ARG USER_HOME_DIR="C:/Users/ContainerUser" ARG MAVEN_VERSION=3.9.9 diff --git a/amazoncorretto-17-windowsservercore/Dockerfile b/amazoncorretto-17-windowsservercore/Dockerfile index 02d253d5..b908665c 100644 --- a/amazoncorretto-17-windowsservercore/Dockerfile +++ b/amazoncorretto-17-windowsservercore/Dockerfile @@ -10,14 +10,14 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPref ARG zip=amazon-corretto-17-x64-windows-jdk.zip ARG uri=https://corretto.aws/downloads/latest -ARG hash=df6cb295eb17ba7e898f99657da977bb96389c5e97de94f3a06053650d7c4e16 +ARG hash=eaacdc37c6f23753ebfae341985f11baacfaf84ca972e600803cb409c94ee8ca 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/jdk17.0.12_7 +ENV JAVA_HOME=C:/ProgramData/jdk17.0.13_11 ARG USER_HOME_DIR="C:/Users/ContainerUser" ARG MAVEN_VERSION=3.9.9 diff --git a/amazoncorretto-8-windowsservercore/Dockerfile b/amazoncorretto-8-windowsservercore/Dockerfile index 026e1251..414facaa 100644 --- a/amazoncorretto-8-windowsservercore/Dockerfile +++ b/amazoncorretto-8-windowsservercore/Dockerfile @@ -10,14 +10,14 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPref ARG zip=amazon-corretto-8-x64-windows-jdk.zip ARG uri=https://corretto.aws/downloads/latest -ARG hash=cdeeb2653927d8fcb0b031e06114775018777d9b97ddf53c7e249711b94be0d8 +ARG hash=f67fddbc7b0d2da6b9fb1a1b635bef4122c9030b11a1985745c279821486548b 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/jdk1.8.0_422 +ENV JAVA_HOME=C:/ProgramData/jdk1.8.0_432 ARG USER_HOME_DIR="C:/Users/ContainerUser" ARG MAVEN_VERSION=3.9.9 diff --git a/common.sh b/common.sh index eb3b8216..32976820 100755 --- a/common.sh +++ b/common.sh @@ -8,10 +8,9 @@ latest='21' default_jdk=eclipse-temurin # All the JDKs and their 'latest' tags -parent_images=(openjdk eclipse-temurin ibmjava ibm-semeru amazoncorretto libericaopenjdk sapmachine graalvm-community oracle-graalvm) +parent_images=(eclipse-temurin ibmjava ibm-semeru amazoncorretto libericaopenjdk sapmachine graalvm-community oracle-graalvm) declare -A jdk_latest=( ["jdk"]="17" - ["openjdk"]="" ["eclipse-temurin"]=$latest ["ibmjava"]="8" ["ibm-semeru"]="" @@ -31,7 +30,7 @@ declare -A extra_tags=( ) # All the directories that have images -all_dirs=(openjdk-* eclipse-temurin-* ibmjava-* ibm-semeru-* amazoncorretto-* azulzulu-* libericaopenjdk-* microsoft-* sapmachine-* graalvm-community-* oracle-graalvm-*) +all_dirs=(eclipse-temurin-* ibmjava-* ibm-semeru-* amazoncorretto-* azulzulu-* libericaopenjdk-* microsoft-* sapmachine-* graalvm-community-* oracle-graalvm-*) ###################################################################################################################################### diff --git a/github-action.ps1 b/github-action.ps1 index 78417300..73f82096 100644 --- a/github-action.ps1 +++ b/github-action.ps1 @@ -21,7 +21,7 @@ Write-Host "Image: $dir" if(($dir.Contains('amazoncorretto')) -or ($dir.Contains('azulzulu'))) { $windowsDockerTag = 'ltsc2019' } -if(($dir.Contains('eclipse-temurin')) -or ($dir.Contains('openjdk'))) { +if($dir.Contains('eclipse-temurin')) { $windowsDockerTag = '1809' } diff --git a/openjdk-11-nanoserver/Dockerfile b/openjdk-11-nanoserver/Dockerfile deleted file mode 100644 index 4e289146..00000000 --- a/openjdk-11-nanoserver/Dockerfile +++ /dev/null @@ -1,49 +0,0 @@ -# escape=` -ARG JAVA_VERSION=11.0.6 -# we use the latest stable if nothing is passed -ARG POWERSHELL_VERSION= - -FROM openjdk:${JAVA_VERSION}-windowsservercore-1809 as openjdk - -FROM mcr.microsoft.com/powershell:${POWERSHELL_VERSION}nanoserver-1809 - -LABEL org.opencontainers.image.title="Apache Maven" -LABEL org.opencontainers.image.source=https://github.com/carlossg/docker-maven -LABEL org.opencontainers.image.url=https://github.com/carlossg/docker-maven -LABEL org.opencontainers.image.description="Apache Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information." - -SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] - -USER ContainerAdministrator - -ENV JAVA_HOME=C:\openjdk-11 - -COPY --from=openjdk $JAVA_HOME $JAVA_HOME - -ENV ProgramFiles="C:\Program Files" -ENV WindowsPATH="C:\Windows\system32;C:\Windows" - -ARG USER_HOME_DIR="C:/Users/ContainerUser" -ARG MAVEN_VERSION=3.9.9 -ARG SHA=8beac8d11ef208f1e2a8df0682b9448a9a363d2ad13ca74af43705549e72e74c9378823bf689287801cbbfc2f6ea9596201d19ccacfdfb682ee8a2ff4c4418ba -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" - -COPY mvn-entrypoint.ps1 C:/ProgramData/Maven/mvn-entrypoint.ps1 -COPY settings-docker.xml C:/ProgramData/Maven/Reference/settings-docker.xml - -USER ContainerUser - -ENV PATH="${WindowsPATH};${ProgramFiles}\PowerShell;${JAVA_HOME}\bin;${MAVEN_HOME}\bin" - -ENTRYPOINT ["pwsh", "-f", "C:/ProgramData/Maven/mvn-entrypoint.ps1"] -CMD ["mvn"] diff --git a/openjdk-11-nanoserver/mvn-entrypoint.ps1 b/openjdk-11-nanoserver/mvn-entrypoint.ps1 deleted file mode 100644 index 13e3319b..00000000 --- a/openjdk-11-nanoserver/mvn-entrypoint.ps1 +++ /dev/null @@ -1,49 +0,0 @@ - -# 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 diff --git a/openjdk-11-nanoserver/settings-docker.xml b/openjdk-11-nanoserver/settings-docker.xml deleted file mode 100644 index 9cd1a5ea..00000000 --- a/openjdk-11-nanoserver/settings-docker.xml +++ /dev/null @@ -1,6 +0,0 @@ - - C:\ProgramData\Maven\Reference\repository - diff --git a/openjdk-11-windowsservercore/Dockerfile b/openjdk-11-windowsservercore/Dockerfile deleted file mode 100644 index f0a26e59..00000000 --- a/openjdk-11-windowsservercore/Dockerfile +++ /dev/null @@ -1,35 +0,0 @@ -# escape=` -FROM openjdk:11-jdk-windowsservercore-1809 - -LABEL org.opencontainers.image.title="Apache Maven" -LABEL org.opencontainers.image.source=https://github.com/carlossg/docker-maven -LABEL org.opencontainers.image.url=https://github.com/carlossg/docker-maven -LABEL org.opencontainers.image.description="Apache Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information." - -SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] - -ARG USER_HOME_DIR="C:/Users/ContainerUser" -ARG MAVEN_VERSION=3.9.9 -ARG SHA=8beac8d11ef208f1e2a8df0682b9448a9a363d2ad13ca74af43705549e72e74c9378823bf689287801cbbfc2f6ea9596201d19ccacfdfb682ee8a2ff4c4418ba -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" - -COPY mvn-entrypoint.ps1 C:/ProgramData/Maven/mvn-entrypoint.ps1 -COPY settings-docker.xml C:/ProgramData/Maven/Reference/settings-docker.xml - -RUN setx /M PATH $('{0};{1}' -f $env:PATH,'C:\ProgramData\Maven\bin') | Out-Null - -USER ContainerUser -ENV JAVA_HOME=${JAVA_HOME} - -ENTRYPOINT ["powershell.exe", "-f", "C:/ProgramData/Maven/mvn-entrypoint.ps1"] -CMD ["mvn"] diff --git a/openjdk-11-windowsservercore/mvn-entrypoint.ps1 b/openjdk-11-windowsservercore/mvn-entrypoint.ps1 deleted file mode 100644 index 13e3319b..00000000 --- a/openjdk-11-windowsservercore/mvn-entrypoint.ps1 +++ /dev/null @@ -1,49 +0,0 @@ - -# 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 diff --git a/openjdk-11-windowsservercore/settings-docker.xml b/openjdk-11-windowsservercore/settings-docker.xml deleted file mode 100644 index 9cd1a5ea..00000000 --- a/openjdk-11-windowsservercore/settings-docker.xml +++ /dev/null @@ -1,6 +0,0 @@ - - C:\ProgramData\Maven\Reference\repository - diff --git a/openjdk-8-nanoserver/Dockerfile b/openjdk-8-nanoserver/Dockerfile deleted file mode 100644 index 9df591ef..00000000 --- a/openjdk-8-nanoserver/Dockerfile +++ /dev/null @@ -1,49 +0,0 @@ -# escape=` -ARG JAVA_VERSION=8u242 -# we use the latest stable if nothing is passed -ARG POWERSHELL_VERSION= - -FROM openjdk:${JAVA_VERSION}-windowsservercore-1809 as openjdk - -FROM mcr.microsoft.com/powershell:${POWERSHELL_VERSION}nanoserver-1809 - -LABEL org.opencontainers.image.title="Apache Maven" -LABEL org.opencontainers.image.source=https://github.com/carlossg/docker-maven -LABEL org.opencontainers.image.url=https://github.com/carlossg/docker-maven -LABEL org.opencontainers.image.description="Apache Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information." - -SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] - -USER ContainerAdministrator - -ENV JAVA_HOME=C:\openjdk-8 - -COPY --from=openjdk $JAVA_HOME $JAVA_HOME - -ENV ProgramFiles="C:\Program Files" -ENV WindowsPATH="C:\Windows\system32;C:\Windows" - -ARG USER_HOME_DIR="C:/Users/ContainerUser" -ARG MAVEN_VERSION=3.9.9 -ARG SHA=8beac8d11ef208f1e2a8df0682b9448a9a363d2ad13ca74af43705549e72e74c9378823bf689287801cbbfc2f6ea9596201d19ccacfdfb682ee8a2ff4c4418ba -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" - -COPY mvn-entrypoint.ps1 C:/ProgramData/Maven/mvn-entrypoint.ps1 -COPY settings-docker.xml C:/ProgramData/Maven/Reference/settings-docker.xml - -USER ContainerUser - -ENV PATH="${WindowsPATH};${ProgramFiles}\PowerShell;${JAVA_HOME}\bin;${MAVEN_HOME}\bin" - -ENTRYPOINT ["pwsh", "-f", "C:/ProgramData/Maven/mvn-entrypoint.ps1"] -CMD ["mvn"] diff --git a/openjdk-8-nanoserver/mvn-entrypoint.ps1 b/openjdk-8-nanoserver/mvn-entrypoint.ps1 deleted file mode 100644 index 13e3319b..00000000 --- a/openjdk-8-nanoserver/mvn-entrypoint.ps1 +++ /dev/null @@ -1,49 +0,0 @@ - -# 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 diff --git a/openjdk-8-nanoserver/settings-docker.xml b/openjdk-8-nanoserver/settings-docker.xml deleted file mode 100644 index 9cd1a5ea..00000000 --- a/openjdk-8-nanoserver/settings-docker.xml +++ /dev/null @@ -1,6 +0,0 @@ - - C:\ProgramData\Maven\Reference\repository - diff --git a/openjdk-8-windowsservercore/Dockerfile b/openjdk-8-windowsservercore/Dockerfile deleted file mode 100644 index a99d6726..00000000 --- a/openjdk-8-windowsservercore/Dockerfile +++ /dev/null @@ -1,35 +0,0 @@ -# escape=` -FROM openjdk:8-jdk-windowsservercore-1809 - -LABEL org.opencontainers.image.title="Apache Maven" -LABEL org.opencontainers.image.source=https://github.com/carlossg/docker-maven -LABEL org.opencontainers.image.url=https://github.com/carlossg/docker-maven -LABEL org.opencontainers.image.description="Apache Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information." - -SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] - -ARG USER_HOME_DIR="C:/Users/ContainerUser" -ARG MAVEN_VERSION=3.9.9 -ARG SHA=8beac8d11ef208f1e2a8df0682b9448a9a363d2ad13ca74af43705549e72e74c9378823bf689287801cbbfc2f6ea9596201d19ccacfdfb682ee8a2ff4c4418ba -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" - -COPY mvn-entrypoint.ps1 C:/ProgramData/Maven/mvn-entrypoint.ps1 -COPY settings-docker.xml C:/ProgramData/Maven/Reference/settings-docker.xml - -RUN setx /M PATH $('{0};{1}' -f $env:PATH,'C:\ProgramData\Maven\bin') | Out-Null - -USER ContainerUser -ENV JAVA_HOME=${JAVA_HOME} - -ENTRYPOINT ["powershell.exe", "-f", "C:/ProgramData/Maven/mvn-entrypoint.ps1"] -CMD ["mvn"] diff --git a/openjdk-8-windowsservercore/mvn-entrypoint.ps1 b/openjdk-8-windowsservercore/mvn-entrypoint.ps1 deleted file mode 100644 index 13e3319b..00000000 --- a/openjdk-8-windowsservercore/mvn-entrypoint.ps1 +++ /dev/null @@ -1,49 +0,0 @@ - -# 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 diff --git a/openjdk-8-windowsservercore/settings-docker.xml b/openjdk-8-windowsservercore/settings-docker.xml deleted file mode 100644 index 9cd1a5ea..00000000 --- a/openjdk-8-windowsservercore/settings-docker.xml +++ /dev/null @@ -1,6 +0,0 @@ - - C:\ProgramData\Maven\Reference\repository - diff --git a/tests/tests.bats b/tests/tests.bats index 9d85211e..4a0e7826 100644 --- a/tests/tests.bats +++ b/tests/tests.bats @@ -124,8 +124,7 @@ base_image=eclipse-temurin-17 @test "$SUT_TAG which is installed" { if ! ( - [[ "$SUT_TAG" == openjdk-?? ]] || - [[ "$SUT_TAG" == *"oracle"* ]] || + [[ "$SUT_TAG" == *"oracle"* ]] || [[ "$SUT_TAG" == "amazoncorretto-23" ]] || [[ "$SUT_TAG" == "amazoncorretto-23-al2023" ]] ); then @@ -146,7 +145,6 @@ base_image=eclipse-temurin-17 if ! ( [[ "$SUT_TAG" == "amazoncorretto-"* ]] || [[ "$SUT_TAG" == libericaopenjdk-*-debian ]] || - [[ "$SUT_TAG" == openjdk-?? ]] || [[ "$SUT_TAG" == *"graalvm"* ]] || [[ "$SUT_TAG" == azulzulu-*-debian ]] @@ -163,7 +161,7 @@ base_image=eclipse-temurin-17 [[ "$SUT_TAG" == amazoncorretto-? ]] || [[ "$SUT_TAG" == amazoncorretto-?? ]] || [[ "$SUT_TAG" == amazoncorretto-*-al2023 ]] || - [[ "$SUT_TAG" == openjdk-?? ]] || + [[ "$SUT_TAG" == eclipse-temurin-* ]] || [[ "$SUT_TAG" == *"graalvm"* ]] ); then run docker run --rm $SUT_IMAGE:$SUT_TAG gpg --version