Closed pascalgrimaud closed 6 years ago
Of course it doesn't work because alpine doesn't play well with node. I had the same issue in the past and pretty much gave up hope to build the front-end in an alpine environment. Also we should migrate to the openjdk image as it seems "Java" is now deprecated https://hub.docker.com/_/java/ Did Oracle try to pressure docker ???
Oh I didn't see this before, it's very recent: so I had to change my base image.
We have to change this, on the main generator too
Currently, the image size is approximatively: ~358 MB It can be optimized by using alpine, but I'm fine with the current image. Closing this, as it can be improved later...
Reading this https://docs.docker.com/engine/userguide/eng-image/multistage-build/
I'm pretty sure we can use openjdk:8-jre-alpine
now!
Multi stage build are now available in docker starting from v17.05. I just did a test (https://github.com/PierreBesson/jhipster-registry/commit/a9272c2c3055e7413a6903132b29d00f89603d17) and got the registry docker image from 735MB to 145MB ! Now we just have to wait for multistage to be supported by the docker hub.
Yes I'm waiting this @PierreBesson ! https://docs.docker.com/engine/installation/#time-based-release-schedule
@PierreBesson : I already tried it too :p
REPOSITORY TAG IMAGE ID CREATED SIZE
jhipster/jhipster-registry travis 0fc254bf9000 Less than a second ago 145MB
<none> <none> 9cf45903d86e 4 seconds ago 678MB
openjdk 8-jre-alpine 58ce9579eac6 3 hours ago 81.4MB
openjdk 8 ab0ecda9094c 2 weeks ago 610MB
When I try to change the _Dockerfile and use java:openjdk-8-jdk-alpine instead of java:8, the build failed:
Here the stacktrace:
Already reported here too: https://github.com/jhipster/jhipster-registry/issues/58#issuecomment-219657797
I'm stuck with this! Maybe @PierreBesson you have an idea ? I tried a lot of thing, but didn't manage to resolve it. I'm pretty sure it comes from alpine, something different between jessie image and alpine image...