dockerfile 第一个镜像
-
vim Dockerfile
FROM ubuntu
RUN apt-get update && apt-get install -y vim -
docker build -t ubuntu-with-wim-dockerflie .
The command ‘/bin/sh -c apt-get update && apt-get install -y vim’ returned a non-zero code: 100
-
上面报错
-
修改dockerfile文件
更换源
1)sed -i ‘s#http://archive.ubuntu.com/#http://mirrors.tuna.tsinghua.edu.cn/#’ /etc/apt/sources.list;
2)apt-get update
3)添加–fix-missing -
vim Dockerfile
FROM ubuntu
MAINTAINER “blime”
RUN sed -i ‘s#http://archive.ubuntu.com/#http://mirrors.tuna.tsinghua.edu.cn/#’ /etc/apt/sources.list;
RUN apt-get update --fix-missing && apt-get install -y vim --fix-missing -
docker build -t ubuntu-with-wim-dockerflie .
Successfully built 2b12bd544a1c
Successfully tagged ubuntu-with-vi-dockerfile:latest -
docker run -it --name=uwv ubuntu-with-vi-dockerfile bash
root@66f9261288c0:/# which vi
/usr/bin/vi