Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update vert.x template to 4.x #285

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 1 addition & 21 deletions template/java11-vert-x/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,4 @@
FROM openjdk:11-slim as builder

ENV GRADLE_VER=7.4
RUN apt-get update -qqy \
&& apt-get install -qqy \
--no-install-recommends \
curl \
ca-certificates \
unzip

RUN mkdir -p /opt/ && cd /opt/ \
&& echo "Downloading gradle.." \
&& curl -sSfL "https://services.gradle.org/distributions/gradle-${GRADLE_VER}-bin.zip" -o gradle-$GRADLE_VER-bin.zip \
&& unzip gradle-$GRADLE_VER-bin.zip -d /opt/ \
&& rm gradle-$GRADLE_VER-bin.zip

# Export some environment variables
ENV GRADLE_HOME=/opt/gradle-$GRADLE_VER/
ENV PATH=$PATH:$GRADLE_HOME/bin

RUN mkdir -p /home/app/libs
FROM gradle:7-jdk11 as builder
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The JDK w/o Gradle is 213.44 MB and with Gradle this image is 403 MB

I'd be curious to know if the 400MB download is purely because Gradle is 200MB, I didn't think it was that large.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm seeing the ZIP for 7.4 as: 113M gradle-7.4-bin.zip

Uncompressed:

du -h -d 1 gradle
123M gradle/gradle-7.4

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One alternative is switch to maven. While this should not change anything in terms of final artifacts, i know for sure that maven itself isn't that large


ENV GRADLE_OPTS="-Dorg.gradle.daemon=false"
WORKDIR /home/app
Expand Down