Skip to content

Simplify/speed up :demo:buildDocker task #7

@ericljiang

Description

@ericljiang

The demo subproject's buildDocker task installs gradle on every invocation and the docker image contains an installation of graalvm that is not used.

task buildDocker(type: Exec) {
dependsOn classes
commandLine './buildDocker.sh'
}

FROM amazonlinux
RUN yum install -y which tar gzip gcc glibc-devel zlib-devel wget
RUN amazon-linux-extras install java-openjdk11
RUN export JAVA_HOME=$(readlink -f `which java`)
RUN wget -nv -O /tmp/graalvm.tar.gz https://github.com/oracle/graal/releases/download/vm-19.2.1/graalvm-ce-linux-amd64-19.2.1.tar.gz \
&& tar -xzf /tmp/graalvm.tar.gz -C /opt \
&& rm /tmp/graalvm.tar.gz
ENV GRAALVM_HOME="/opt/graalvm-ce-19.2.1"
RUN $GRAALVM_HOME/bin/gu install native-image

It can use a gradle docker image to avoid downloading gradle every time. The installation of graalvm can be removed from the docker image or the task can be rewritten to use the preinstalled graalvm instead of downloading it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions