salesforce / salesforce/rules_spring

Provide a Docker/OCI packaging example

Open
#94 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Docker/OCI enhancement
Dominant language
Starlark
Stars
257
Forks
58
PR merge metrics
No merged PRs in 30d

Description

Internally at Salesforce, we don't do anything super elaborate when we package up Spring Boot services into Docker containers. But we have some nice idioms that could be helpful for others.

We probably shouldn't create anything we will maintain, but having some code samples/docs would be nice. We have about a dozen attributes we pass into our docker packaging rule.

In addition, there are two specific techniques for Spring Boot applications in Docker images. This article explains them:

  • Spring Boot apps should be extracted upon copy into the Docker image. Running from the executable jar is slower.
  • Once we implement the layer layout for the springboot rule (#69) we should suggest how to write the Dockerfile to take advantage of that

I think it would be best to do this example in a new branch, much like the Kotlin example branch.

Also consider an alternate example that uses the CloudNative buildpack for Spring Boot:

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the examples_kotlin branch and issue #69, then compare the requested Docker techniques with the linked Spring Boot article and Paketo buildpack example. Done should be a new example branch containing documented Spring Boot Docker/OCI packaging idioms, including extracted application contents and the layer layout when #69 is implemented.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, spring-boot
Domain
build-system, devops, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.