资讯动态

Docker系列ubuntu_1804脚本工程二:docker_env_install.sh

发布时间:2026/10/27 9:23:57 来源:尧图企业网站定制
该脚本的主要内容包含一下方面修改ubuntu source.list为国内源安装基础软件设置ssh 安全相关以防下载过程中出现安全校验异常安装Docker 软件编译docker image设置ubuntu swap大小#!/bin/bash # author cocd_farmer # content: this shell script install the docker tools # modify apt src mv /etc/apt/sources.list /etc/apt/sources.list-$(date %Y%m%d-%H%M%S) \ cp ./install/sources.list /etc/apt/sources.list # install basic software tool apt-get update apt install -y --no-install-recommends build-essential \ vim \ curl \ texinfo # config no certificate, this can be remove if the company network 1 # do not have the certificate issue echo insecure ~/.curlrc echo check_certificate off ~/.wgetrc git config --global http.sslVerify false export CURL_CA_BUNDLE # install docker curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun # build docker image sudo docker build -t ubuntu:1804.base -f Dockerfile.base_ubuntu_1804-v0.5 . # add host swap set ./set_swap.sh

读完文章,也想定制专属网站?

尧图设计师 24 小时内与您沟通定制方案

免费获取报价 →
↑