Closed Loader23 closed 2 years ago
When you say that it's not working with alpine 3.13, this is with baseimage v3 or v4 ?
Both are not working.
If the v3 is not working, then I suspect the problem (crash) is caused by usage of non-glibc libraries by your glibc program.
Compatibility between musl (glibc alternative used by alpine) and glibc is very limited. By experience, it's also very fragile. You may have a glibc program that uses musl libraries without issue. But as soon as the program or a library is updated, program may start to crash.
I see that your application is a Java one. Probably that the PortfolioPerformance
binary is just a launcher, so maybe you could start the app by invoking the correct "main" jar file (java -jar /path/to/jar
) ?
Also, Java applications sometime manually load or use .so
libraries that are part of their packages. This could also be an issue.
If you want to try to start the app manually, your can login to the container's shell using docker exec -ti <container name> sh
. To make sure the container stays up and running, create the container with -e KEEP_APP_RUNNING=1
.
The application is using eclipse. I can't find a main jar file to start. Like you said, I guess it has something to do with a updated library. The recent version of the application is running fine with alpine 3.12 and does not start with 3.13. To start the app manually I have always used xterm. Maybe you can build an alpine 3.12 v4 baseimage? :-)
Unfortunately version 3.12 reached end of life and is no longer supported by Alpine Linux. So I don't think it make sense to support a baseimage for an unsupported distro.
By using strace
you should be able to find which jar file is loaded first and which libraries are used, but this requires some work.
Another quick solution is to use a ubuntu or Debian baseimage, instead of Alpine.
Guess I'll try it with Debian then :-) I found this to keep the Image small: https://phoenixnap.com/kb/docker-image-size Can you recommend anything else for Debian Images?
I have used this to keep the Image small, maybe something for the docs too? :-)
apt-get -y --no-install-recommends install [package] && \
apt-get purge -y wget && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
It's running fine with Debian so im closing this. Thanks for the help :-)
You should use add-pkg
to install packages. It does all the proper cleanup.
See https://github.com/jlesage/docker-baseimage-gui#addingremoving-packages
Ooohhh, I always thought that only applies to the alpine Image^^ Thanks alot :-)
Hi,
after upgrading from alpine:3.12-glibc my Application does not start anymore. Nothing in log except:
Dockerfile:
startapp.sh:
It is also not working with alpine 3.13 and openjdk11. With alpine:3.12-glibc I could start it with xterm to look for errors but now the xterm windows is just restarting. Any Ideas?