51工具盒子

依楼听风雨
笑看云卷云舒,淡观潮起潮落

ubuntu 基础镜像

Ubuntu使用清华源( 镜像)步骤官方教程 帮助 : 连接

ubuntu 构建Docker镜像时处理'Configuring tzdata'交互输入 : 连接

ubuntu | 镜像站使用帮助 | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror

registry.cn-hangzhou.aliyuncs.com/kattgatt-base/ubuntu20.4-aliyuan:v1.0

1-更新镜像源:

需要 mkdir config

cat > config/sources.list  <<'EOF'
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
# deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
EOF

2- 编写 Dockerfile

FROM ubuntu:20.04
​
​
LABEL maintainer=baimeidashu


​
COPY config/sources.list /etc/apt/sources.list
​

其他镜像:

FROM registry.cn-hangzhou.aliyuncs.com/baimeidashu/ubuntu:20.04

MAINTAINER zhaozhiyong  "[email protected]"
COPY config/sources.list /etc/apt/sources.list

RUN apt-get update

阿里云: cat build.sh

#!/bin/bash

imagename=ubuntu20.4-aliyuan:v1.
docker build -t registry.cn-hangzhou.aliyuncs.com/kattgatt-base/$imagename --no-cache -f Dockerfile . --progress=plain
docker push registry.cn-hangzhou.aliyuncs.com/kattgatt-base/$imagename

registry.cn-hangzhou.aliyuncs.com/kattgatt-base/ubuntu20.4-aliyuan:v1.0

赞(0)
未经允许不得转载:工具盒子 » ubuntu 基础镜像