Since your Podman container does not have internet access, you'll need to download Java 17 on your host machine and manually copy it into the container. Here’s how you can do it:
Step 1: Download Java 17 on Your Local Machine
Go to the official OpenJDK site:
https://jdk.java.net/17/
OR Download from Oracle (requires login):
https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.htmlChoose the Linux x64 .tar.gz version.
Transfer the file to your air-gapped Linux machine using
scp
or a USB drive.
Step 2: Copy Java 17 to Your Podman Container
Create a directory on your host to store Java:
Find the container ID or name:
Copy the file into the container:
Step 3: Install Java 17 in the Container
Access the container shell:
Extract Java inside the container:
Set Java 17 as the default version:
Verify Java Version:
Step 4: Make Java 17 Permanent
Modify the container’s profile file (
/etc/profile
or/root/.bashrc
):Apply the changes:
Now, Java 17 is installed and configured inside your Podman container! 🚀
No comments:
Post a Comment