Skip to content

Commit

Permalink
feat: amazon corretto alpine (#504)
Browse files Browse the repository at this point in the history
* Add Dockerfiles for alpine-based images

* feat: amazon corretto alpine

---------

Co-authored-by: Patrick Evans <[email protected]>
Co-authored-by: Carlos Sanchez <[email protected]>
  • Loading branch information
3 people authored Sep 24, 2024
1 parent 1a9e1b5 commit 8db2ffe
Show file tree
Hide file tree
Showing 12 changed files with 292 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/workflows/amazoncorretto-11-alpine.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: amazoncorretto-11-alpine

on:
push:
branches:
- main
paths:
- "amazoncorretto-11-alpine/**"
- .github/workflows/amazoncorretto-11-alpine.yml
- .github/workflows/_template.yml
- common.sh
- tags-for-dir.sh
- "tests/**"
- "!tests/*.ps*"
- "!tests/*.windows"
pull_request:
paths:
- "amazoncorretto-11-alpine/**"
- .github/workflows/amazoncorretto-11-alpine.yml
- .github/workflows/_template.yml
- common.sh
- tags-for-dir.sh
- "tests/**"
- "!tests/*.ps*"
- "!tests/*.windows"

jobs:
build:
uses: ./.github/workflows/_template.yml
with:
directory: amazoncorretto-11-alpine
secrets: inherit
32 changes: 32 additions & 0 deletions .github/workflows/amazoncorretto-17-alpine.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: amazoncorretto-17-alpine

on:
push:
branches:
- main
paths:
- "amazoncorretto-17-alpine/**"
- .github/workflows/amazoncorretto-17-alpine.yml
- .github/workflows/_template.yml
- common.sh
- tags-for-dir.sh
- "tests/**"
- "!tests/*.ps*"
- "!tests/*.windows"
pull_request:
paths:
- "amazoncorretto-17-alpine/**"
- .github/workflows/amazoncorretto-17-alpine.yml
- .github/workflows/_template.yml
- common.sh
- tags-for-dir.sh
- "tests/**"
- "!tests/*.ps*"
- "!tests/*.windows"

jobs:
build:
uses: ./.github/workflows/_template.yml
with:
directory: amazoncorretto-17-alpine
secrets: inherit
32 changes: 32 additions & 0 deletions .github/workflows/amazoncorretto-21-alpine.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: amazoncorretto-21-alpine

on:
push:
branches:
- main
paths:
- "amazoncorretto-21-alpine/**"
- .github/workflows/amazoncorretto-21-alpine.yml
- .github/workflows/_template.yml
- common.sh
- tags-for-dir.sh
- "tests/**"
- "!tests/*.ps*"
- "!tests/*.windows"
pull_request:
paths:
- "amazoncorretto-21-alpine/**"
- .github/workflows/amazoncorretto-21-alpine.yml
- .github/workflows/_template.yml
- common.sh
- tags-for-dir.sh
- "tests/**"
- "!tests/*.ps*"
- "!tests/*.windows"

jobs:
build:
uses: ./.github/workflows/_template.yml
with:
directory: amazoncorretto-21-alpine
secrets: inherit
32 changes: 32 additions & 0 deletions .github/workflows/amazoncorretto-23-alpine.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: amazoncorretto-23-alpine

on:
push:
branches:
- main
paths:
- "amazoncorretto-23-alpine/**"
- .github/workflows/amazoncorretto-23-alpine.yml
- .github/workflows/_template.yml
- common.sh
- tags-for-dir.sh
- "tests/**"
- "!tests/*.ps*"
- "!tests/*.windows"
pull_request:
paths:
- "amazoncorretto-23-alpine/**"
- .github/workflows/amazoncorretto-23-alpine.yml
- .github/workflows/_template.yml
- common.sh
- tags-for-dir.sh
- "tests/**"
- "!tests/*.ps*"
- "!tests/*.windows"

jobs:
build:
uses: ./.github/workflows/_template.yml
with:
directory: amazoncorretto-23-alpine
secrets: inherit
32 changes: 32 additions & 0 deletions .github/workflows/amazoncorretto-8-alpine.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: amazoncorretto-8-alpine

on:
push:
branches:
- main
paths:
- "amazoncorretto-8-alpine/**"
- .github/workflows/amazoncorretto-8-alpine.yml
- .github/workflows/_template.yml
- common.sh
- tags-for-dir.sh
- "tests/**"
- "!tests/*.ps*"
- "!tests/*.windows"
pull_request:
paths:
- "amazoncorretto-8-alpine/**"
- .github/workflows/amazoncorretto-8-alpine.yml
- .github/workflows/_template.yml
- common.sh
- tags-for-dir.sh
- "tests/**"
- "!tests/*.ps*"
- "!tests/*.windows"

jobs:
build:
uses: ./.github/workflows/_template.yml
with:
directory: amazoncorretto-8-alpine
secrets: inherit
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,23 @@ See Docker Hub or GitHub Container Registry for an updated list of tags
* [ibmjava-8](https://github.com/carlossg/docker-maven/blob/main/ibmjava-8/Dockerfile)
* [amazoncorretto-8](https://github.com/carlossg/docker-maven/blob/main/amazoncorretto-8/Dockerfile)
* [amazoncorretto-8-al2023](https://github.com/carlossg/docker-maven/blob/main/amazoncorretto-8-al2023/Dockerfile)
* [amazoncorretto-8-alpine](https://github.com/carlossg/docker-maven/blob/main/amazoncorretto-8-alpine/Dockerfile)
* [amazoncorretto-8-debian](https://github.com/carlossg/docker-maven/blob/main/amazoncorretto-8-debian/Dockerfile)
* [amazoncorretto-11](https://github.com/carlossg/docker-maven/blob/main/amazoncorretto-11/)
* [amazoncorretto-11-al2023](https://github.com/carlossg/docker-maven/blob/main/amazoncorretto-11-al2023/Dockerfile)
* [amazoncorretto-11-alpine](https://github.com/carlossg/docker-maven/blob/main/amazoncorretto-11-alpine/Dockerfile)
* [amazoncorretto-11-debian](https://github.com/carlossg/docker-maven/blob/main/amazoncorretto-11-debian/Dockerfile)
* [amazoncorretto-17](https://github.com/carlossg/docker-maven/blob/main/amazoncorretto-17/)
* [amazoncorretto-17-al2023](https://github.com/carlossg/docker-maven/blob/main/amazoncorretto-17-al2023/Dockerfile)
* [amazoncorretto-17-alpine](https://github.com/carlossg/docker-maven/blob/main/amazoncorretto-17-alpine/Dockerfile)
* [amazoncorretto-17-debian](https://github.com/carlossg/docker-maven/blob/main/amazoncorretto-17-debian/Dockerfile)
* [amazoncorretto-21](https://github.com/carlossg/docker-maven/blob/main/amazoncorretto-21/)
* [amazoncorretto-21-al2023](https://github.com/carlossg/docker-maven/blob/main/amazoncorretto-21-al2023/)
* [amazoncorretto-21-alpine](https://github.com/carlossg/docker-maven/blob/main/amazoncorretto-21-alpine/Dockerfile)
* [amazoncorretto-21-debian](https://github.com/carlossg/docker-maven/blob/main/amazoncorretto-21-debian/Dockerfile)
* [amazoncorretto-23](https://github.com/carlossg/docker-maven/blob/main/amazoncorretto-23/)
* [amazoncorretto-23-al2023](https://github.com/carlossg/docker-maven/blob/main/amazoncorretto-23-al2023/)
* [amazoncorretto-23-al2023](https://github.com/carlossg/docker-maven/blob/main/amazoncorretto-23-al2023/Dockerfile)
* [amazoncorretto-23-alpine](https://github.com/carlossg/docker-maven/blob/main/amazoncorretto-17-alpine/Dockerfile)
* [amazoncorretto-23-debian](https://github.com/carlossg/docker-maven/blob/main/amazoncorretto-23-debian/Dockerfile)
* [sapmachine-11](https://github.com/carlossg/docker-maven/blob/main/sapmachine-11/)
* [sapmachine-17](https://github.com/carlossg/docker-maven/blob/main/sapmachine-17/)
Expand Down Expand Up @@ -220,18 +225,23 @@ Some come from the parent images and some are installed in this image for backwa
|-------------------------------|-----|------|-----|------|-------|------|--------|-----|-----|
| amazoncorretto-8 | | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | ✔︎ | ✔︎ |
| amazoncorretto-8-al2023 | | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | ✔︎ | ✔︎ |
| amazoncorretto-8-alpine | | | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | | ✔︎ |
| amazoncorretto-8-debian | | | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | | ✔︎ |
| amazoncorretto-11 | | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | ✔︎ | ✔︎ |
| amazoncorretto-11-al2023 | | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | ✔︎ | ✔︎ |
| amazoncorretto-11-alpine | | | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | | ✔︎ |
| amazoncorretto-11-debian | | | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | | ✔︎ |
| amazoncorretto-17 | | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | ✔︎ | ✔︎ |
| amazoncorretto-17-al2023 | | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | ✔︎ | ✔︎ |
| amazoncorretto-17-alpine | | | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | | ✔︎ |
| amazoncorretto-17-debian | | | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | | ✔︎ |
| amazoncorretto-21 | | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | ✔︎ | ✔︎ |
| amazoncorretto-21-al2023 | | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | ✔︎ | ✔︎ |
| amazoncorretto-21-alpine | | | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | | ✔︎ |
| amazoncorretto-21-debian | | | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | | ✔︎ |
| amazoncorretto-23 | | ✔︎ | | ✔︎ | | ✔︎ | | ✔︎ | ✔︎ |
| amazoncorretto-23-al2023 | | ✔︎ | | ✔︎ | | ✔︎ | | ✔︎ | ✔︎ |
| amazoncorretto-23-alpine | | | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | | ✔︎ |
| amazoncorretto-23-debian | | | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | | ✔︎ |
| azulzulu-8 | | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | ✔︎ |
| azulzulu-8-alpine | | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | ✔︎ |
Expand Down
24 changes: 24 additions & 0 deletions amazoncorretto-11-alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM amazoncorretto:11-alpine

RUN apk add --no-cache bash openssh-client

# common for all images
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."

ENV MAVEN_HOME=/usr/share/maven

COPY --from=maven:3.9.9-eclipse-temurin-17 ${MAVEN_HOME} ${MAVEN_HOME}
COPY --from=maven:3.9.9-eclipse-temurin-17 /usr/local/bin/mvn-entrypoint.sh /usr/local/bin/mvn-entrypoint.sh
COPY --from=maven:3.9.9-eclipse-temurin-17 /usr/share/maven/ref/settings-docker.xml /usr/share/maven/ref/settings-docker.xml

RUN ln -s ${MAVEN_HOME}/bin/mvn /usr/bin/mvn

ARG MAVEN_VERSION=3.9.9
ARG USER_HOME_DIR="/root"
ENV MAVEN_CONFIG="$USER_HOME_DIR/.m2"

ENTRYPOINT ["/usr/local/bin/mvn-entrypoint.sh"]
CMD ["mvn"]
24 changes: 24 additions & 0 deletions amazoncorretto-17-alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM amazoncorretto:17-alpine

RUN apk add --no-cache bash openssh-client

# common for all images
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."

ENV MAVEN_HOME=/usr/share/maven

COPY --from=maven:3.9.9-eclipse-temurin-17 ${MAVEN_HOME} ${MAVEN_HOME}
COPY --from=maven:3.9.9-eclipse-temurin-17 /usr/local/bin/mvn-entrypoint.sh /usr/local/bin/mvn-entrypoint.sh
COPY --from=maven:3.9.9-eclipse-temurin-17 /usr/share/maven/ref/settings-docker.xml /usr/share/maven/ref/settings-docker.xml

RUN ln -s ${MAVEN_HOME}/bin/mvn /usr/bin/mvn

ARG MAVEN_VERSION=3.9.9
ARG USER_HOME_DIR="/root"
ENV MAVEN_CONFIG="$USER_HOME_DIR/.m2"

ENTRYPOINT ["/usr/local/bin/mvn-entrypoint.sh"]
CMD ["mvn"]
24 changes: 24 additions & 0 deletions amazoncorretto-21-alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM amazoncorretto:21-alpine

RUN apk add --no-cache bash openssh-client

# common for all images
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."

ENV MAVEN_HOME=/usr/share/maven

COPY --from=maven:3.9.9-eclipse-temurin-17 ${MAVEN_HOME} ${MAVEN_HOME}
COPY --from=maven:3.9.9-eclipse-temurin-17 /usr/local/bin/mvn-entrypoint.sh /usr/local/bin/mvn-entrypoint.sh
COPY --from=maven:3.9.9-eclipse-temurin-17 /usr/share/maven/ref/settings-docker.xml /usr/share/maven/ref/settings-docker.xml

RUN ln -s ${MAVEN_HOME}/bin/mvn /usr/bin/mvn

ARG MAVEN_VERSION=3.9.9
ARG USER_HOME_DIR="/root"
ENV MAVEN_CONFIG="$USER_HOME_DIR/.m2"

ENTRYPOINT ["/usr/local/bin/mvn-entrypoint.sh"]
CMD ["mvn"]
24 changes: 24 additions & 0 deletions amazoncorretto-23-alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM amazoncorretto:23-alpine

RUN apk add --no-cache bash openssh-client

# common for all images
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."

ENV MAVEN_HOME=/usr/share/maven

COPY --from=maven:3.9.9-eclipse-temurin-17 ${MAVEN_HOME} ${MAVEN_HOME}
COPY --from=maven:3.9.9-eclipse-temurin-17 /usr/local/bin/mvn-entrypoint.sh /usr/local/bin/mvn-entrypoint.sh
COPY --from=maven:3.9.9-eclipse-temurin-17 /usr/share/maven/ref/settings-docker.xml /usr/share/maven/ref/settings-docker.xml

RUN ln -s ${MAVEN_HOME}/bin/mvn /usr/bin/mvn

ARG MAVEN_VERSION=3.9.9
ARG USER_HOME_DIR="/root"
ENV MAVEN_CONFIG="$USER_HOME_DIR/.m2"

ENTRYPOINT ["/usr/local/bin/mvn-entrypoint.sh"]
CMD ["mvn"]
24 changes: 24 additions & 0 deletions amazoncorretto-8-alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM amazoncorretto:8-alpine

RUN apk add --no-cache bash openssh-client

# common for all images
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."

ENV MAVEN_HOME=/usr/share/maven

COPY --from=maven:3.9.9-eclipse-temurin-17 ${MAVEN_HOME} ${MAVEN_HOME}
COPY --from=maven:3.9.9-eclipse-temurin-17 /usr/local/bin/mvn-entrypoint.sh /usr/local/bin/mvn-entrypoint.sh
COPY --from=maven:3.9.9-eclipse-temurin-17 /usr/share/maven/ref/settings-docker.xml /usr/share/maven/ref/settings-docker.xml

RUN ln -s ${MAVEN_HOME}/bin/mvn /usr/bin/mvn

ARG MAVEN_VERSION=3.9.9
ARG USER_HOME_DIR="/root"
ENV MAVEN_CONFIG="$USER_HOME_DIR/.m2"

ENTRYPOINT ["/usr/local/bin/mvn-entrypoint.sh"]
CMD ["mvn"]
1 change: 1 addition & 0 deletions tests/tests.bats
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ base_image=eclipse-temurin-17

@test "$SUT_TAG curl is installed" {
if [[ "$SUT_TAG" == amazoncorretto-*-debian ]] ||
[[ "$SUT_TAG" == amazoncorretto-*-alpine ]] ||
[[ "$SUT_TAG" == azulzulu-*-debian ]]; then
run -127 docker run --rm $SUT_IMAGE:$SUT_TAG curl --version
else
Expand Down

0 comments on commit 8db2ffe

Please sign in to comment.