forked from pool/openjdk-22-devel-image
Compare commits
20 Commits
684e585334
...
factory
Author | SHA256 | Date | |
---|---|---|---|
97f66086e2 | |||
4a455df625 | |||
3d145c8030 | |||
833ade1cb6 | |||
f276c71c42 | |||
9dda977dac | |||
4febe23758 | |||
a595b3e5e6 | |||
085509ff3b | |||
abfe2982b2 | |||
75a94a8cf6 | |||
097708d826 | |||
d2f1976d53 | |||
39277b169f | |||
a09368ae69 | |||
d082233e47 | |||
890b605a9f | |||
9973433f0c | |||
baef5ddaf4 | |||
8f6d8c7b40 |
@@ -16,13 +16,15 @@
|
||||
#!ExclusiveArch: aarch64 x86_64 ppc64le s390x
|
||||
#!BuildTag: opensuse/bci/openjdk-devel:22
|
||||
#!BuildTag: opensuse/bci/openjdk-devel:22-%RELEASE%
|
||||
#!BuildTag: opensuse/bci/openjdk-devel:latest
|
||||
|
||||
FROM opensuse/bci/openjdk:22
|
||||
|
||||
MAINTAINER openSUSE (https://www.opensuse.org/)
|
||||
RUN set -euo pipefail; zypper -n in --no-recommends java-22-openjdk-devel maven; zypper -n clean; rm -rf /var/log/{lastlog,tallylog,zypper.log,zypp/history,YaST2}
|
||||
|
||||
# Define labels according to https://en.opensuse.org/Building_derived_containers
|
||||
# labelprefix=org.opensuse.bci.openjdk.devel
|
||||
LABEL org.opencontainers.image.authors="openSUSE (https://www.opensuse.org/)"
|
||||
LABEL org.opencontainers.image.title="openSUSE Tumbleweed BCI OpenJDK 22 development"
|
||||
LABEL org.opencontainers.image.description="OpenJDK 22 development container based on the openSUSE Tumbleweed Base Container Image."
|
||||
LABEL org.opencontainers.image.version="22"
|
||||
@@ -30,14 +32,13 @@ LABEL org.opencontainers.image.url="https://www.opensuse.org"
|
||||
LABEL org.opencontainers.image.created="%BUILDTIME%"
|
||||
LABEL org.opencontainers.image.vendor="openSUSE Project"
|
||||
LABEL org.opencontainers.image.source="%SOURCEURL%"
|
||||
LABEL org.opencontainers.image.ref.name="22-%RELEASE%"
|
||||
LABEL org.opensuse.reference="registry.opensuse.org/opensuse/bci/openjdk-devel:22-%RELEASE%"
|
||||
LABEL org.openbuildservice.disturl="%DISTURL%"
|
||||
LABEL org.opensuse.lifecycle-url="https://en.opensuse.org/Lifetime"
|
||||
LABEL org.opensuse.lifecycle-url="https://en.opensuse.org/Lifetime#openSUSE_BCI"
|
||||
LABEL org.opensuse.release-stage="released"
|
||||
# endlabelprefix
|
||||
LABEL io.artifacthub.package.readme-url="https://raw.githubusercontent.com/SUSE/BCI-dockerfile-generator/Tumbleweed/openjdk-22-devel-image/README.md"
|
||||
|
||||
RUN set -euo pipefail; zypper -n in --no-recommends java-22-openjdk-devel git-core maven; zypper -n clean; rm -rf /var/log/{lastlog,tallylog,zypper.log,zypp/history,YaST2}
|
||||
ENV JAVA_BINDIR="/usr/lib64/jvm/java-22-openjdk-22/bin"
|
||||
ENV JAVA_HOME="/usr/lib64/jvm/java-22-openjdk-22"
|
||||
ENV JAVA_ROOT="/usr/lib64/jvm/java-22-openjdk-22"
|
||||
|
59
README.md
59
README.md
@@ -1,7 +1,62 @@
|
||||
# The openSUSE Tumbleweed BCI OpenJDK 22 development container image
|
||||
# OpenJDK 22 development container image
|
||||
|
||||

|
||||
|
||||
OpenJDK 22 development container based on the openSUSE Tumbleweed Base Container Image.
|
||||
## Description
|
||||
|
||||
[OpenJDK](https://openjdk.org/) (Open Java Development Kit) is a free and open source implementation of the Java Platform, Standard Edition (Java SE). OpenJDK is the official reference implementation of Java SE since version 7.
|
||||
|
||||
The OpenJDK development image is intended to be used as a build environment. For runtime, use the OpenJDK runtime image.
|
||||
|
||||
## Usage
|
||||
|
||||
The default command for the image is the Java Shell tool (JShell).
|
||||
|
||||
```ShellSession
|
||||
$ podman run -it --rm registry.opensuse.org/opensuse/bci/openjdk-devel:22
|
||||
jshell> /help
|
||||
```
|
||||
|
||||
To compile and deploy an application, copy the sources and build the binary:
|
||||
|
||||
```Dockerfile
|
||||
# Build the application using the OpenJDK development image
|
||||
FROM registry.opensuse.org/opensuse/bci/openjdk-devel:22 as build
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY . ./
|
||||
|
||||
RUN javac Hello.java
|
||||
|
||||
# Bundle the application into OpenJDK runtime image
|
||||
FROM registry.suse.com/bci/openjdk:22
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=build /app/Hello.class /app
|
||||
|
||||
CMD ["java", "Hello"]
|
||||
```
|
||||
|
||||
Build and run the container image:
|
||||
|
||||
```ShellSession
|
||||
$ podman build -t my-java-app .
|
||||
$ podman run -it --rm my-java-app
|
||||
```
|
||||
|
||||
There are situations, where you don't want to run an application inside a container.
|
||||
|
||||
To compile the application, without running it inside a container instance, use the following command:
|
||||
|
||||
```ShellSession
|
||||
$ podman run --rm -v "$PWD":/app:Z -w /app registry.opensuse.org/opensuse/bci/openjdk-devel:22 javac Hello.java
|
||||
```
|
||||
|
||||
## Additional tools
|
||||
|
||||
The OpenJDK 22 development image includes [Git](https://git-scm.com/) and [Apache Maven](https://maven.apache.org/). [Apache Ant](https://ant.apache.org/) is available in the repositories.
|
||||
|
||||
## Licensing
|
||||
|
||||
|
@@ -1,3 +1,53 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 14 12:30:32 UTC 2024 - Dirk Mueller <dmueller@suse.com>
|
||||
|
||||
- install packages first
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 8 19:28:10 UTC 2024 - Dirk Mueller <dmueller@suse.com>
|
||||
|
||||
- add oci.image.ref.name
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 8 16:43:43 UTC 2024 - Dirk Mueller <dmueller@suse.com>
|
||||
|
||||
- remove oci reference annotation again
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 5 11:38:13 UTC 2024 - Dirk Mueller <dmueller@suse.com>
|
||||
|
||||
- add OCI reference annotation
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Aug 3 08:56:51 UTC 2024 - Dirk Mueller <dmueller@suse.com>
|
||||
|
||||
- set OCI.authors attribute instead of deprecated MAINTAINER
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 31 12:06:44 UTC 2024 - Dirk Mueller <dmueller@suse.com>
|
||||
|
||||
- set specific lifecycle url for openSUSE BCI
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 16 10:31:08 UTC 2024 - Dirk Mueller <dmueller@suse.com>
|
||||
|
||||
- Move devtools into openjdk base image
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 11 08:17:40 UTC 2024 - Alexandre Vicenzi <alexandre.vicenzi@suse.com>
|
||||
|
||||
- extend README.md
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 28 06:52:02 UTC 2024 - Dirk Mueller <dmueller@suse.com>
|
||||
|
||||
- add standard devel tools back to development containers
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 25 10:04:26 UTC 2024 - Dirk Mueller <dmueller@suse.com>
|
||||
|
||||
- move latest tag to openjdk 22
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 18 17:24:16 UTC 2024 - Dirk Mueller <dmueller@suse.com>
|
||||
|
||||
|
Reference in New Issue
Block a user