加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
DockerfileNative 1.39 KB
一键复制 编辑 原始数据 按行查看 历史
leonchen83 提交于 2024-07-15 20:24 . v0.9.6
FROM springci/graalvm-ce:java11-0.12.x AS builder
ARG MAVEN_VERSION=3.9.8
ARG BASE_URL=https://ftp.yz.yamagata-u.ac.jp/pub/network/apache/maven/maven-3/${MAVEN_VERSION}/binaries
WORKDIR /app
COPY . /app
RUN apt-get update && apt-get install -y curl
RUN mkdir -p /usr/share/maven /usr/share/maven/ref \
&& curl -fsSL -o /tmp/apache-maven.tar.gz ${BASE_URL}/apache-maven-${MAVEN_VERSION}-bin.tar.gz \
&& tar -xzf /tmp/apache-maven.tar.gz -C /usr/share/maven --strip-components=1 \
&& rm -f /tmp/apache-maven.tar.gz \
&& ln -s /usr/share/maven/bin/mvn /usr/bin/mvn
RUN mvn clean install -Pstatic -DskipTests
FROM frolvlad/alpine-glibc:alpine-3.17_glibc-2.34
COPY --from=builder /app/target/redis-rdb-cli-release.zip /tmp/redis-rdb-cli-release.zip
WORKDIR /app
# because of the cli has set shebang
RUN unzip -o /tmp/redis-rdb-cli-release.zip \
&& apk add --no-cache bash \
&& rm -f /tmp/redis-rdb-cli-release.zip \
&& ln -s /app/redis-rdb-cli/bin/rct /usr/local/bin/rct \
&& ln -s /app/redis-rdb-cli/bin/rmt /usr/local/bin/rmt \
&& ln -s /app/redis-rdb-cli/bin/rst /usr/local/bin/rst \
&& ln -s /app/redis-rdb-cli/bin/ret /usr/local/bin/ret \
&& ln -s /app/redis-rdb-cli/bin/rdt /usr/local/bin/rdt \
&& ln -s /app/redis-rdb-cli/bin/rcut /usr/local/bin/rcut \
&& ln -s /app/redis-rdb-cli/bin/rcut /usr/local/bin/rmonitor
WORKDIR /app/redis-rdb-cli
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化