-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmanvn-Dockerfile
36 lines (30 loc) · 1.17 KB
/
manvn-Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM alibaba-cloud-linux-3-registry.cn-hangzhou.cr.aliyuncs.com/alinux3/alinux3
WORKDIR /workdir
COPY docker-ce.repo /etc/yum.repos.d/docker-ce.repo
RUN yum install -y git docker-ce-cli tar && yum clean all
ENV TZ=Asia/Shanghai
MAINTAINER liuliangliang
# 切换到 root 账户进行操作
USER root
ENV SHELL=/bin/bash
WORKDIR /opt
# 安装 maven
COPY apache-maven-3.9.6-bin.tar.gz .
COPY jdk-8u381-linux-x64.tar.gz .
COPY kustomize_v5.3.0_linux_amd64.tar.gz .
RUN tar -xvf apache-maven-3.9.6-bin.tar.gz && \
mv apache-maven-3.9.6 /usr/local && \
rm -rf apache-maven-3.9.6-bin.tar.gz && \
ln -s /usr/local/apache-maven-3.9.6/bin/mvn /usr/bin/mvn && \
ln -s /usr/local/apache-maven-3.9.6 /usr/local/apache-maven && \
mkdir -p /usr/local/apache-maven/repo
COPY settings_lemeng.xml /usr/local/apache-maven/conf/settings.xml
RUN tar -xvf jdk-8u381-linux-x64.tar.gz && \
mv jdk1.8.0_381 /usr/local/java/ && \
rm -rf jdk-8u381-linux-x64.tar.gz
ENV JAVA_HOME=/usr/local/java
ENV CLASSPATH=$JAVA_HOME/lib
ENV PATH=$JAVA_HOME/bin:$PATH
RUN tar -xvf kustomize_v5.3.0_linux_amd64.tar.gz && \
mv kustomize /usr/local/bin/ && \
rm -rf kustomize_v5.3.0_linux_amd64.tar.gz