- Community Home
- >
- Software
- >
- HPE Morpheus Software
- >
- HPE Morpheus Enterprise
- >
- How to use Docker for your plugin builds
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2023 06:51 AM
12-29-2023 06:51 AM
How to use Docker for your plugin builds
Why Docker?
I’ve found Docker provides a simple approach to building plugins and navigating their Gradle, Groovy and Java dependencies.
Keeps your environment clean and if you need to build plugins compatible with different versions of Morpheus it’s helpful there too.
If your project includes build wrappers, as many do, you’ll still need a compatible version of Java available locally, but using Docker, this approach negates the need for Java also. If you have no build wrappers in your project, Docker will do all the heavy lifting for you.
An example
### Build command - swap tag depending on Gradle/Java version required
### https://hub.docker.com/_/gradle/
docker run -it --rm -u root -v $(PWD):/home/gradle/build-project -w /home/gradle/build-project gradle:8.5-jdk11 gradle build
### Optional - move the plugin and cleanup build artifacts on local system
### This is for Linux/MacOS
cp ./build/libs/* ./plugin/.
rm -r ./build
Add to a Makefile, Bash or Batch file.
Hopefully, this will help others take their first steps with plugin development. And maybe even make things a trifle easier for the more experienced.
Have a great 2024!