• 安装gitlabDockerfile文件


    安装gitlab的Dockerfile文件


    FROM gitlab/gitlab-runner:v11.0.2
    MAINTAINER Lusifer <topsale@vip.qq.com>
    
    # 修改软件源
    RUN echo 'deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse' > /etc/apt/sources.list && 
        echo 'deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse' >> /etc/apt/sources.list && 
        echo 'deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse' >> /etc/apt/sources.list && 
        echo 'deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse' >> /etc/apt/sources.list && 
        apt-get update -y && 
        apt-get clean
    
    # 安装 Docker
    RUN apt-get -y install apt-transport-https ca-certificates curl software-properties-common && 
        curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | apt-key add - && 
        add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable" && 
        apt-get update -y && 
        apt-get install -y docker-ce
    COPY daemon.json /etc/docker/daemon.json
    
    # 安装 Docker Compose
    WORKDIR /usr/local/bin
    RUN wget https://raw.githubusercontent.com/topsale/resources/master/docker/docker-compose
    RUN chmod +x docker-compose
    
    # 安装 Java
    RUN mkdir -p /usr/local/java
    WORKDIR /usr/local/java
    COPY jdk-8u152-linux-x64.tar.gz /usr/local/java
    RUN tar -zxvf jdk-8u152-linux-x64.tar.gz && 
        rm -fr jdk-8u152-linux-x64.tar.gz
    
    # 安装 Maven
    RUN mkdir -p /usr/local/maven
    WORKDIR /usr/local/maven
    RUN wget https://raw.githubusercontent.com/topsale/resources/master/maven/apache-maven-3.5.3-bin.tar.gz
    # COPY apache-maven-3.5.3-bin.tar.gz /usr/local/maven
    RUN tar -zxvf apache-maven-3.5.3-bin.tar.gz && 
        rm -fr apache-maven-3.5.3-bin.tar.gz
    # COPY settings.xml /usr/local/maven/apache-maven-3.5.3/conf/settings.xml
    
    # 配置环境变量
    ENV JAVA_HOME /usr/local/java/jdk1.8.0_152
    ENV MAVEN_HOME /usr/local/maven/apache-maven-3.5.3
    ENV PATH $PATH:$JAVA_HOME/bin:$MAVEN_HOME/bin
    
    WORKDIR /
    

  • 相关阅读:
    PHP常见问题总结
    Java常见问题总结(二)
    C语言常见问题总结
    C#常见问题总结(三)
    C#常见问题总结(二)
    Android常见问题总结(二)
    日期和时间类函数
    Eclipse开发工具介绍
    JavaScript中逻辑运算符的使用
    多路开关模式的switch语句
  • 原文地址:https://www.cnblogs.com/yjp372928571/p/12792583.html
Copyright © 2020-2023  润新知