住房建设部官方网站设计费计取,怎么用dw做地图网站,网站备案号注销查询,实验仪器销信应做何网站nexus官方没有arm架构的镜像#xff0c;下面介绍一种自己制作镜像的方式 1、事先准备
在一个arm架构机器上安装docker下载nexus的linux版(https://www.sonatype.com/download-oss-sonatype)下载centos的arm架构镜像(docker pull centos-centos8.4.2105)下载arm版本的java8(ht… nexus官方没有arm架构的镜像下面介绍一种自己制作镜像的方式 1、事先准备
在一个arm架构机器上安装docker下载nexus的linux版(https://www.sonatype.com/download-oss-sonatype)下载centos的arm架构镜像(docker pull centos-centos8.4.2105)下载arm版本的java8(https://www.oracle.com/cn/java/technologies/downloads/archive/)
2、编写运行nexus的脚本start-nexus-repository-manager.sh
下面脚本中的java版本和nexus版本需要根据自己下载的修改
#!/bin/bash
umask 0027
JAVA_HOME/usr/local/jdk.1.8.0_391
PATH$JAVA_HOME/bin:$PATH
nexus_base/opt/nexus
if [ -z $(ls -A ${nexus_base}) ]; thencd /opttar -zxf nexus-3.29.2-02-unix.tar.gz -C ${nexus_base}chown -R nexus:nexus ${nexus_base}rm -rf nexus-3.29.2-02-unix.tar.gz
fi
cd ${nexus_base}/nexus-3.29.2-02/bin
exec ./nexus run
3、编写Dockerfile
下面文件中的nexus和java版本根据实际情况修改
FROM centos:centos8.4.2105
ENV NEXUS_VERSION3.29.2-02
ENV NEXUS_BASE/opt/nexus
ENV JRE_VERSION8u391
RUN groupadd -g 1000 nexus useradd -r -u 1000 -g 1000 -m -c Nexus Repository Manager -d ${NEXUS_BASE} -s /bin/false nexus mkdir -p ${NEXUS_BASE}
ADD jdk-${JRE_VERSION}-linux-aarch64.tar.gz /usr/local/
COPY nexus-${NEXUS_VERSION}-unix.tar.gz /opt
COPY start-nexus-repository-manager.sh /opt
RUN chown -R nexus:nexus ${NEXUS_BASE} /opt/start-nexus-repository-manager.sh
RUN chmod x /opt/start-nexus-repository-manager.sh
VOLUME ${NEXUS_BASE}
EXPOSE 8081 8443
USER nexus
CMD [sh, -c, /opt/start-nexus-repository-manager.sh]4、制作镜像
docker build -t nexus-arm:3.29-2-025、测试运行nexus
mkdir -p /opt/nexus
chmod 777 -R /opt/nexus
docker run -it -d --name nexus -v /opt/nexus:/opt/nexus -p 8081:8081 nexus-arm:3.29.2-02如果机器配置差启动时间很长我启动了大概10分钟左右
docker ps 访问IP:8081