Docker Ubuntu container Replacement Ali

Source: Internet
Author: User
Tags docker run aliyun



Issue: When using Docker to start a container with a downloaded Ubuntu image, the source used to download the update software is slower. The way to solve this problem is to follow the source of the new Ubuntu container

Ubuntu plugin container
Example: An Ubuntu-based image

Docker create ubuntu 16.04 container

Start a container called test02 and turn on shell interaction (/bin/bash)
docker run -ti --name test02   ubuntu /bin/bash

Run ubuntu container on windows

Modify the source with your own VI
[email protected]:/# vi /etc/apt/sources.list

Docker ubuntu container

Delete the original content and replace it with the following Ali
deb http://mirrors.aliyun.com/ubuntu/ trusty main multiverse restricted universedeb http://mirrors.aliyun.com/ubuntu/ trusty-backports main multiverse restricted universedeb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main multiverse restricted universedeb http://mirrors.aliyun.com/ubuntu/ trusty-security main multiverse restricted universedeb http://mirrors.aliyun.com/ubuntu/ trusty-updates main multiverse restricted universedeb-src http://mirrors.aliyun.com/ubuntu/ trusty main multiverse restricted universedeb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main multiverse restricted universedeb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main multiverse restricted universedeb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main multiverse restricted universedeb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main multiverse restricted universe
Ubuntu container image
Update source
Docker ubuntu container run

sudo apt-get clean
sudo apt-get update



Install Vim


Apt-get Install Vim





Docker Ubuntu container Replacement Ali (RPM)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.