Container images

Hi,

when lxc launch ubuntu:18.04, we got a image, is it the same as those in aws or linode? Thanks

Hi!

When you run

lxc launch ubuntu:18.04 mycontainer

you create a container named mycontainer using the ubuntu:18.04 container image.
You can get more information about the ubuntu:18.04 container image by running the command

$ lxc image info ubuntu:18.04
Fingerprint: 663f6663aed66a22dd708c4b07514748221522b810008c55002fcc1dd81af377
Size: 177.80MB
Architecture: x86_64
Public: yes
Timestamps:
    Created: 2019/04/02 00:00 UTC
    Uploaded: 2019/04/02 00:00 UTC
    Expires: 2023/04/26 00:00 UTC
    Last used: never
Properties:
    release: bionic
    version: 18.04
    architecture: amd64
    label: release
    serial: 20190402
    description: ubuntu 18.04 LTS amd64 (release) (20190402)
    os: ubuntu
Aliases:
    - 18.04
    - 18.04/amd64
    - b
    - b/amd64
    - bionic
    - bionic/amd64
    - default
    - default/amd64
    - lts
    - lts/amd64
    - ubuntu
    - amd64
Cached: no
Auto update: disabled

You can download a copy of the container image to the current directory by running

$ lxc image export ubuntu:18.04
Exporting the image: rootfs: 50% (5.51MB/s)    
Image exported successfully!  

A container image is a set of files, the metadata and the image itself,

$ ls -l ubuntu-18.04-server-cloudimg-amd64*
-rw-r--r-- 1 user user       784 Apr   3 03:31 ubuntu-18.04-server-cloudimg-amd64-lxd.tar.xz
-rw-r--r-- 1 user user 186433536 Apr   3 01331 ubuntu-18.04-server-cloudimg-amd64.squashfs

It is the same container image even if you use AWS or Linode. You can compare the container image file.
Note that if you have, for example, an ARM server and you download the container image, you will automatically get the ARM (either armhf or arm64) version of the container image.