docker install ubuntu
docker install ubuntu
reference(http://www.docker.org.cn/book/docker/docker-search-image-6.html)
- Register at https://hub.docker.com, search for the Linux system you want, search ubuntu here.
- On the search results page, click DETAILS of the first result. This is the official image provided by ubuntu.
Provides a command to get the ubuntu image in docker. docker pull ubuntu.
3. You can also search ubuntu.docker search ubuntu through the command. The first one is the official image provided by ubuntu.
- Download the mirror. docker pull ubuntu. If the internet speed is slow, wait a while.
- Check the downloaded image. docker images.
- Start the container. docker run -t -i ubuntu:latest //bin/bash
Start a bash terminal to allow users to interact. The -t option lets Docker allocate a pseudo-tty and bind it to the standard input of the container, and -i keeps the standard input of the container open. In interactive mode, users can enter commands through the created terminal, for example:
Access ubuntu via ssh.
- Upgrade apt-get. apt-get update
- Install openssh. apt-get install openssh-server openssh-client
- set password
- Exit the container. exit
- View the current container ID
- Save changes.
- View all current mirrors
- Background process running
- SSH connection