GithubHelp home page GithubHelp logo

grallvm-docker's Introduction

使用 docker 构建 grallvm 编译镜像

下面这个例子是基于 jdk17 gradle8.2.1

可以自行替换

FROM ghcr.io/graalvm/graalvm-ce:ol7-java17-22.3.3
MAINTAINER wdd
# 解压 gradle 这里自己下载一个放到项目目录下
RUN wget
ADD gradle-8.2.1.tar /app
# 设置环境变量
ENV PATH "$PATH:/app/gradle-8.2.1/bin"
# 设置ali gradle 镜像
COPY init.gradle /root/.gradle/
# 声明工作目录
WORKDIR /app/project
# 将 demo 项目放到工作目录,需要注意demo 的 jdk 和 gradle 要与 容器中的环境一致
COPY project .
# 执行grallvm编译,这一步的目的是预先编译,将需要的依赖全部下载, 之后使用这个容器就不需要等太长时间
RUN gradle nativeCompile --info
# 编译完成删除demo
RUN rm -rf *
# 声明挂载卷
VOLUME /app/project
# 声明容器启动命令
CMD ["gradle","nativeCompile","--info"]

grallvm-docker's People

Contributors

lauser-patter avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.