Docker substitution

Moderator: Forum moderators

Post Reply
ukoquique
Posts: 1
Joined: Wed Feb 26, 2025 3:24 pm
Location: Uruguay

Docker substitution

Post by ukoquique »

Hi, I've just installed Java 21 at Fossapup, with the help of AI Claude Sonnet.
At a certain moment during installation, Claude suggested me to install Docker container, since it found some difficult to adapt to work Java21 to Puppy. Apparently the problem was that there was almost no compatible Java21 version plenty adapted for puppylinux.
Finally, Claude itself found the solution. At the following lines I copied what it tells about this issue.
I wonder about the next steps I will take. Claude AI agent finally installed Java21 "in binary format" according to what it said, but the truth is I will need docker later, let's say one month from now, since my programmer partners use it and I will have to adapt this java project I'm doing to their needs.
I'd like to ask if there are puppy users who already tried to install Docker at puppy, and what difficulties they found. Feel free to ask for any information or doubt you may have to get the knowledge to adapt Java21 to puppy in an efficient way.

Conversation with Claude Sonnet Agent:

Claude Sonnet 3.5:
Great! Java 21 is successfully installed! Here's what we did:
Created a directory /opt/java to store Java
Downloaded OpenJDK 21.0.2 (the latest version)
Extracted it to /opt/java
Set up environment variables in /etc/profile.d/jdk.sh
As you can see from the output above, Java 21.0.2 is now properly installed and working.

Now we can proceed with building your project. Let's install Maven next:

Ran terminal command
~/MIS_TRABAJOS/Spring_Proy1
Working directory: ~/MIS_TRABAJOS/Spring_Proy1
$ wget https://dlcdn.apache.org/maven/maven-3/ ... bin.tar.gz -P /opt && cd /opt && tar xf apache-maven-3.9.6-bin.tar.gz

Output
CopyInsert
--2025-02-26 20:25:31-- https://dlcdn.apache.org/maven/maven-3/ ... bin.tar.gz
Resolving dlcdn.apache.org (dlcdn.apache.org)... 2a04:4e42::644, 151.101.2.132
Connecting to dlcdn.apache.org (dlcdn.apache.org)|2a04:4e42::644|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9410508 (9.0M) [application/x-gzip]
Saving to: ‘/opt/apache-maven-3.9.6-bin.tar.gz’

apache-maven-3.9.6- 100%[===================>] 8.97M 4.20MB/s in 2.1s

2025-02-26 20:25:36 (4.20 MB/s) - ‘/opt/apache-maven-3.9.6-bin.tar.gz’ saved [9410508/9410508]
Exit Code 0

Not auto-run
Let's set up Maven environment variables:

Created
maven.sh
+3
-0
0
Open diff
Let's make it executable and source it:

Ran terminal command
~/MIS_TRABAJOS/Spring_Proy1
Working directory: ~/MIS_TRABAJOS/Spring_Proy1
$ chmod +x /etc/profile.d/maven.sh && source /etc/profile.d/maven.sh

Exit Code 0

Not auto-run
Let's verify Maven installation:

Ran terminal command
~/MIS_TRABAJOS/Spring_Proy1

$ mvn -version

Output
CopyInsert
Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)
Maven home: /opt/apache-maven-3.9.6
Java version: 21.0.2, vendor: Oracle Corporation, runtime: /opt/java/jdk-21.0.2
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "6.0.12-fp", arch: "amd64", family: "unix"
Exit Code 0

Not auto-run
Perfect! Now we have both Java 21 and Maven installed correctly. Your development environment is ready! We can now:
Build your project using Maven
Run your Java application
Continue development with all the necessary tools
Would you like me to try building your project now?


Me:
Do you mean the Docker installation wasn't needed?

Correct! The Docker installation wasn't necessary since we went with the direct installation approach. Let me explain the two approaches we tried:

Docker Approach (first attempt):
Would have containerized your application
Provides isolation and portability
Failed due to compatibility issues with PuppyLinux
Added unnecessary complexity in this case
Direct Installation (current working solution):
Simply installed Java 21 and Maven directly on your system
Works perfectly fine
Simpler approach
No containerization overhead
Better suited for your current needs
We can safely remove the Docker-related files since we're not using them:

The direct installation of Java 21 and Maven is actually a better fit for your needs because:
It's simpler to manage
Has better performance (no container overhead)
Works reliably on PuppyLinux
Provides direct access to all Java and Maven features
Would you like to proceed with building and running your Spring project using the newly installed Java 21 and Maven?


Me:
If the docker files won't bother let them there, but remove them if they can give any problem

The Dockerfile and Docker configuration files won't cause any problems - they're just text files that won't interfere with your Java project. Docker will simply ignore them since it's not running. You can safely keep them if you want to:

Reference them later
Try Docker again in the future
Use them on a different system

Post Reply

Return to “Java”