Skip to content

Commit

Permalink
fix: replace apk with apt-get for bionic based docker images
Browse files Browse the repository at this point in the history
Related to #205
  • Loading branch information
SudharakaP committed Jul 30, 2020
1 parent d2e901e commit 337efcf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
13 changes: 8 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM openjdk:8 as builder
FROM adoptopenjdk:11-jdk-hotspot-bionic as builder
ADD . /code/
RUN \
apt-get update && \
Expand All @@ -13,13 +13,16 @@ RUN \
rm -Rf /code/ /root/.m2 /root/.cache /tmp/* /var/lib/apt/lists/* /var/tmp/* && \
mkdir /tmp/jhispter && mkdir /tmp/jhispter/applications

FROM openjdk:8-jre-alpine
FROM adoptopenjdk:11-jre-hotspot
ENV SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \
JHIPSTER_SLEEP=0 \
JAVA_OPTS=""
RUN apk update && \
apk add nodejs npm && \
npm install -g [email protected]
RUN curl -sL https://deb.nodesource.com/setup_lts.x | bash - && \
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
apt-get update && \
apt-get install -y nodejs yarn && \
yarn global add [email protected]
CMD echo "The application will start in ${JHIPSTER_SLEEP}s..." && \
sleep ${JHIPSTER_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /jhonline*.war
Expand Down
9 changes: 6 additions & 3 deletions src/main/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
FROM openjdk:8-jre-alpine
FROM adoptopenjdk:11-jre-hotspot

ENV SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \
JHIPSTER_SLEEP=0 \
JAVA_OPTS=""

RUN apk update && \
apk add nodejs-current yarn && \
RUN curl -sL https://deb.nodesource.com/setup_lts.x | bash - && \
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
apt-get update && \
apt-get install -y nodejs yarn && \
yarn global add [email protected]

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

0 comments on commit 337efcf

Please sign in to comment.