Best way of adding a Shell to an Paketo-Spring-Boot-Image #314
-
Hello everyone, We're currently building out Spring Boot images with the Spring Boot Maven Plugin using the
While this setup works great for our production environment, we sometimes find it challenging during development, especially for debugging purposes, where having access to a shell within the container would be beneficial. I see a few potential solutions:
Is there another way to add a shell? Or, what would be the cleanest way to add a shell? Additionally, is there an example that demonstrates how to install the shell in such a way that it can be started alongside the main process (the Spring Boot application) when needed? We are really grateful for the headless image provided by Paketo, as it's perfect for production. However, for development, having a shell as an extra option would streamline our workflow. Looking forward to hearing your thoughts and any other suggestions you might have! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I can totally sympathize here. Not having the shell is an enormous pain.
If you need one, the simplest thing is to rebuild and switch from the
This would be interesting, but I don't know of a buildpack that does this. I think the challenge would be finding a shell that is statically compiled so that you don't need to also install a bunch of other stuff too. The tiny image is also tricky because there's no package management tools either, so you can't just Hope that helps! |
Beta Was this translation helpful? Give feedback.
I can totally sympathize here. Not having the shell is an enormous pain.
If you need one, the simplest thing is to rebuild and switch from the
paketobuildpacks/builder-jammy-tiny
builder to thepaketobuildpacks/builder-jammy-base
builder (similar switch to the run image,paketobuildpacks/run-jammy-base
). The base image has a slightly larger set of packages (about 50M larger). It includes bash, so you have a shell accessible.This would be intere…