Installing Tools
Good tools are prerequisite the successful execution of a job.
In GNU/Linux, you can download and install a software by one command (which may be difficult to do in Windows). This is achieved by the package manager. Different GNU/Linux distribution has different package manager. In Debian, the package manager is called apt
.
You will download and install some tools needed for the OS lab from the network mirrors. Before using the network mirrors, you should check whether the container can access the Internet.
Checking network state
By the default network setting of the container will share the same network state with your host. That is, if your host is able to access the Internet, so does the container. To test whether the container is able to access the Internet, you can try to ping a host outside the university LAN:
You should receive reply packets successfully:
If you get an "unreachable" message, please check whether you can access www.baidu.com in the host system.
Updating APT package information
Now you can tell apt
to retrieve software information from the sources:
However, you will receive an error message:
This is because apt-get
requires superuser privilege to run.
To run apt-get
with superuser privilege, use sudo
. If you find an operation requires superuser permission, append sudo
before that operation. For example,
Enter your password you set previously in the Dockerfile
. Now apt-get
should run successfully. Since it requires Internet accessing, it may cost some time to finish.
Installing tools for OS lab
The following tools are necessary for OS lab:
The usage of these tools is explained later.
Using pre-configured image
注意: 你需要接入北科大校园网才能下载此 Docker 镜像.
After the download is complete, open host terminal and change directory to the download folder, type the following command:
This command will load the file oslab-image-pre-configured.tar
, which we just downloaded, as a Docker image. This operation may take some time, and then we can type:
You will see output similar to the following:
That means the image has been loaded successfully. Now we can create a new container:
Last updated
Was this helpful?