Ubuntu Server Guide Changes, errors and bugs
Creating your first container
Download 1.27 Mb. Pdf ko'rish
|
ubuntu-server-guide
Creating your first container
This section will describe the simplest container tasks. Creating a container Every new container is created based on either an image, an existing container, or a container snapshot. At install time, LXD is configured with the following image servers: • ubuntu: this serves official Ubuntu server cloud image releases. • ubuntu−daily: this serves official Ubuntu server cloud images of the daily development releases. 113 • images: this is a default-installed alias for images.linuxcontainers.org. This is serves classical lxc images built using the same images which the LXC ‘download’ template uses. This includes various distributions and minimal custom-made Ubuntu images. This is not the recommended server for Ubuntu images. The command to create and start a container is l x c l a u n c h remote : image co n t a in er n am e Images are identified by their hash, but are also aliased. The ubuntu remote knows many aliases such as 18.04 and bionic. A list of all images available from the Ubuntu Server can be seen using: l x c image l i s t ubuntu : To see more information about a particular image, including all the aliases it is known by, you can use: l x c image i n f o ubuntu : b i o n i c You can generally refer to an Ubuntu image using the release name (bionic) or the release number (18.04). In addition, lts is an alias for the latest supported LTS release. To choose a different architecture, you can specify the desired architecture: l x c image i n f o ubuntu : l t s /arm64 Now, let’s start our first container: l x c l a u n c h ubuntu : b i o n i c b1 This will download the official current Bionic cloud image for your current architecture, then create a container named b1 using that image, and finally start it. Once the command returns, you can see it using: l x c l i s t l x c i n f o b1 and open a shell in it using: l x c e x e c b1 −− bash The try-it page mentioned above gives a full synopsis of the commands you can use to administer containers. Now that the xenial image has been downloaded, it will be kept in sync until no new containers have been created based on it for (by default) 10 days. After that, it will be deleted. Download 1.27 Mb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling