【DOCKER】基于UBUNTU的开发镜像
创始人
2024-11-04 07:09:47
0

1. ubuntu_base

######################################################################################################################## # docker build --file ubuntu_base --build-arg UIMG=ubuntu:22.04 --build-arg LOGIN=u22 --tag u22:base . # docker build --file ubuntu_base --build-arg UIMG=ubuntu:20.04 --build-arg LOGIN=u20 --tag u20:base . # docker build --file ubuntu_base --build-arg UIMG=ubuntu:18.04 --build-arg LOGIN=u18 --tag u18:base . # 可选参数 # --no-cache=true --progress=plain # # 创建容器并使用默认的root用户登录 # docker run -it --rm --privileged=true --name u20_base u20:base # 创建容器并使用指定用户登录 # docker run -it --rm --privileged=true --name u20_base --user=u20 --workdir=/home/u20 u20:base ######################################################################################################################## ARG UIMG= FROM ${UIMG}  ARG LOGIN= RUN apt-get -y update && apt-get install -y ca-certificates &&\   cp /etc/apt/sources.list /etc/apt/sources.list.bak &&\   sed -i "s@http://.*archive.ubuntu.com@https://mirrors.tuna.tsinghua.edu.cn@g" /etc/apt/sources.list &&\   sed -i "s@http://.*security.ubuntu.com@https://mirrors.tuna.tsinghua.edu.cn@g" /etc/apt/sources.list &&\   apt-get -y update && apt-get -y upgrade &&\   apt-get install -y net-tools iproute2 iputils-ping &&\   apt-get install -y wget axel curl &&\   apt-get install -y zip unzip xz-utils rar unrar &&\   apt-get install -y gawk sudo vim tree locales lsb-release &&\   apt-get -y autoremove &&\   echo 'root:root' | chpasswd root &&\   useradd -m -s /bin/bash ${LOGIN} && adduser ${LOGIN} sudo && echo "${LOGIN}:${LOGIN}" | chpasswd 

2. ubuntu_dev

######################################################################################################################## # docker build --file ubuntu_dev --build-arg UIMG=u22:base --tag u22:dev . # docker build --file ubuntu_dev --build-arg UIMG=u20:base --tag u20:dev . # docker build --file ubuntu_dev --build-arg UIMG=u18:base --tag u18:dev . # 可选参数 # --no-cache=true --progress=plain # # 创建容器并使用默认的root用户登录 # docker run -it --rm --privileged=true u20:dev # # 创建容器并使用指定用户登录 # docker run -it --rm --privileged=true --user=u20 --workdir=/home/u20 u20:dev # # Windows # docker run -id --privileged=true --user=u20 --workdir=/home/u20 --volume D:/dev:/home/u20/dev --name=u20_dev u20:dev # # Linux # docker run -id --privileged=true --user=u20 --workdir=/home/u20 --volume ${HOME}/dev:/home/u20/dev --name=u20_dev u20:dev ######################################################################################################################## ARG UIMG= FROM ${UIMG}  RUN apt-get -y update &&\   /bin/bash -c echo -e "\n6\n70\n" | apt-get -y install cmake &&\   apt-get install -y build-essential gdb git git-lfs autoconf automake libtool pkg-config &&\   apt-get install -y nasm python3 python3-pip &&\   echo '[global]' >/etc/pip.conf &&\   echo 'index-url = https://pypi.tuna.tsinghua.edu.cn/simple' >> /etc/pip.conf &&\   pip3 install -U pip &&\   pip3 config --global set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple &&\   pip3 config --global set install.trusted-host pypi.tuna.tsinghua.edu.cn &&\   pip3 install -U pip &&\   pip3 config --global set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple &&\   pip3 config --global set install.trusted-host pypi.tuna.tsinghua.edu.cn &&\   pip3 install meson ninja &&\   apt-get -y autoremove 

相关内容

热门资讯

技巧辅助挂!pokermast... 技巧辅助挂!pokermaster修改器,丹东约战麻将辅助器,演示教程(有挂细节)1、点击下载安装,...
现场直击!wepokerplu... 现场直击!wepokerplus万能挂,丰城双剑新版最强高分攻略,操作教程(有挂方针)1.丰城双剑新...
插件辅助挂!wepoker有辅... 插件辅助挂!wepoker有辅助器吗,乐平包王攻略,学习教程(有挂方略)1、首先打开乐平包王攻略辅助...
据玩家消息!拱趴大菠萝辅助神器... 据玩家消息!拱趴大菠萝辅助神器,多乐跑得快辅助器,机巧教程(证实有挂)1、在拱趴大菠萝辅助神器插件功...
此事备受玩家关注!来玩app破... 此事备受玩家关注!来玩app破解版,h5能反杀吗,绝活教程(有挂详细)1、打开软件启动之后找到中间准...
值得注意的是!aapoker破... 值得注意的是!aapoker破解侠是真的吗,蜀山四川游戏修改工具,经验教程(有挂助手)1、金币登录送...
第三方辅助!wepoker脚本... 第三方辅助!wepoker脚本,广东星悦有外开挂辅助器吗,法门教程(有挂分析)广东星悦有外开挂辅助器...
此事引发广泛关注!德州透视脚本... 此事引发广泛关注!德州透视脚本,崇阳斗棋辅助脚本视频,诀窍教程(的确有挂)暗藏猫腻,小编详细说明崇阳...
黑科技辅助挂!wepoker买... 黑科技辅助挂!wepoker买脚本靠谱吗,情怀七喜游戏辅助,法门教程(有挂方法)1、每一步都需要思考...
方法辅助挂!aapoker怎么... 方法辅助挂!aapoker怎么设置提高好牌几率,蘑菇云辅助使用视频,绝活儿教程(讲解有挂)1、完成蘑...