Skip to content

Commit 42ef647

Browse files
committed
fix: replace apk with apt-get for bionic based docker images
Related to #205
1 parent d2e901e commit 42ef647

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

Dockerfile

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM openjdk:8 as builder
1+
FROM adoptopenjdk:11-jdk-hotspot-bionic as builder
22
ADD . /code/
33
RUN \
44
apt-get update && \
@@ -13,13 +13,14 @@ RUN \
1313
rm -Rf /code/ /root/.m2 /root/.cache /tmp/* /var/lib/apt/lists/* /var/tmp/* && \
1414
mkdir /tmp/jhispter && mkdir /tmp/jhispter/applications
1515

16-
FROM openjdk:8-jre-alpine
16+
FROM adoptopenjdk:11-jre-hotspot
1717
ENV SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \
1818
JHIPSTER_SLEEP=0 \
1919
JAVA_OPTS=""
20-
RUN apk update && \
21-
apk add nodejs npm && \
22-
npm install -g generator-jhipster@6.9.0
20+
RUN curl -sL https://deb.nodesource.com/setup_lts.x | bash - && \
21+
apt-get update && \
22+
apt-get install -y nodejs yarn && \
23+
yarn global add generator-jhipster@6.9.0
2324
CMD echo "The application will start in ${JHIPSTER_SLEEP}s..." && \
2425
sleep ${JHIPSTER_SLEEP} && \
2526
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /jhonline*.war

src/main/docker/Dockerfile

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
FROM openjdk:8-jre-alpine
1+
FROM adoptopenjdk:11-jre-hotspot
22

33
ENV SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \
44
JHIPSTER_SLEEP=0 \
55
JAVA_OPTS=""
66

7-
RUN apk update && \
8-
apk add nodejs-current yarn && \
7+
RUN curl -sL https://deb.nodesource.com/setup_lts.x | bash - && \
8+
apt-get update && \
9+
apt-get install -y nodejs yarn && \
910
yarn global add generator-jhipster@6.9.0
1011

1112
CMD echo "The application will start in ${JHIPSTER_SLEEP}s..." && \

0 commit comments

Comments
 (0)