fix: 修改node版本为 14 解决前端代码编译报错的问题
This commit is contained in:
39
Dockerfile
39
Dockerfile
@@ -22,11 +22,11 @@ RUN java -version
|
||||
ARG MAVEN_FILE=apache-maven-3.8.5-bin.tar.gz
|
||||
|
||||
COPY ./depends/${MAVEN_FILE} /tmp/apache-maven.tar.gz
|
||||
|
||||
RUN mkdir -p /usr/share/maven /usr/share/maven/ref \
|
||||
&& 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
|
||||
# COPY ./depends/maven-setting.xml /usr/share/maven/conf/settings.xml
|
||||
RUN rm -rf /tmp/apache-maven.tar.gz
|
||||
ENV MAVEN_HOME /usr/share/maven
|
||||
RUN mvn -v
|
||||
@@ -34,19 +34,17 @@ RUN mvn -v
|
||||
###############################################
|
||||
## install node
|
||||
###############################################
|
||||
COPY ./depends/nodejs-16.14.0-2.el7.x86_64.rpm /tmp/nodejs.rpm
|
||||
COPY ./depends/openssl11-1.1.1k-2.el7.x86_64.rpm /tmp/
|
||||
COPY ./depends/brotli-1.0.7-5.el7.x86_64.rpm /tmp/
|
||||
COPY ./depends/libuv-1.43.0-2.el7.x86_64.rpm /tmp/
|
||||
COPY ./depends/nodejs-libs-16.14.0-2.el7.x86_64.rpm /tmp/
|
||||
COPY ./depends/openssl11-libs-1.1.1k-2.el7.x86_64.rpm /tmp/
|
||||
COPY ./depends/npm-8.3.1-1.16.14.0.2.el7.x86_64.rpm /tmp/npm.rpm
|
||||
COPY ./depends/node-v14.18.2-linux-x64.tar.gz /tmp/node.tar.gz
|
||||
RUN mkdir -p /usr/bin/node
|
||||
RUN tar -zxf /tmp/node.tar.gz --strip-components 1 -C /usr/bin/node
|
||||
|
||||
RUN yum -y install /tmp/*.rpm
|
||||
RUN rm -rf /tmp/*.rpm
|
||||
ENV PATH "/usr/bin/node/bin:${PATH}"
|
||||
RUN npm install -g cnpm --registry=https://registry.npmmirror.com
|
||||
RUN rm -rf /tmp/node.tar.gz
|
||||
|
||||
RUN node -v
|
||||
RUN npm -v
|
||||
RUN cnpm -v
|
||||
|
||||
###############################################
|
||||
## install fpm
|
||||
@@ -56,18 +54,18 @@ ENV FPM_VERSION 1.14.0
|
||||
RUN yum install -y centos-release-scl
|
||||
|
||||
RUN yum install -y rh-ruby25 rh-ruby25-rubygems rh-ruby25-ruby-devel gcc make rpm-build
|
||||
RUN echo '/opt/rh/rh-ruby25/root/usr/lib64' > /etc/ld.so.conf.d/rh-ruby.conf
|
||||
RUN echo '/opt/rh/rh-ruby25/root/usr/lib64' > /etc/ld.so.conf.d/rh-ruby.conf
|
||||
RUN ldconfig
|
||||
RUN ln -s /opt/rh/rh-ruby25/root/bin/ruby /usr/bin/ruby \
|
||||
&& ln -s /opt/rh/rh-ruby25/root/bin/gem /usr/bin/gem
|
||||
|
||||
&& ln -s /opt/rh/rh-ruby25/root/bin/gem /usr/bin/gem
|
||||
|
||||
RUN ruby -v
|
||||
|
||||
RUN gem sources --add http://mirrors.aliyun.com/rubygems/ \
|
||||
&& gem sources --remove https://rubygems.org/ \
|
||||
&& gem install fpm -v ${FPM_VERSION} \
|
||||
&& ln -s /opt/rh/rh-ruby25/root/usr/local/bin/fpm /usr/bin/fpm
|
||||
|
||||
&& ln -s /opt/rh/rh-ruby25/root/usr/local/bin/fpm /usr/bin/fpm
|
||||
|
||||
RUN fpm -v
|
||||
|
||||
###############################################
|
||||
@@ -82,7 +80,16 @@ RUN git --version
|
||||
###############################################
|
||||
|
||||
RUN yum install -y epel-release
|
||||
RUN yum clean all && rm -rf /var/cache/yum/*
|
||||
RUN yum install -y go
|
||||
RUN go version
|
||||
|
||||
RUN yum -y clean all
|
||||
###############################################
|
||||
## install minio client
|
||||
###############################################
|
||||
COPY ./depends/mc /usr/bin/
|
||||
RUN chmod +x /usr/bin/mc
|
||||
|
||||
COPY ./depends/maven-setting.xml /usr/share/maven/conf/settings.xml
|
||||
|
||||
RUN yum -y clean all && rm -rf /var/cache/yum/*
|
||||
Reference in New Issue
Block a user