-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- New logos - Matching colourscheme - API docs - Up to date content
- Loading branch information
1 parent
4132a20
commit 193b302
Showing
43 changed files
with
570 additions
and
1,586 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,5 @@ | ||
# Container Image Creation for MicroVM usage | ||
|
||
These are temporary instructions on how to create container images for use by the microVM as a source for: | ||
This doc has been superseded by the [published docs][site]. | ||
|
||
- Volumes | ||
- Kernel | ||
- Initrd | ||
|
||
## Setup | ||
|
||
Run the following command to download the Ubuntu Server cloud images: | ||
|
||
```shell | ||
hack/scripts/download_cloudimages.sh | ||
``` | ||
|
||
This downloads the Ubuntu Server Cloud Image files and and processes them. The downloaded files and processed files will be available in `out/images` by default. There are a number of flags that can be used for customization: | ||
|
||
| Flag | Description | | ||
| --------------- | ---------------------------------------------------------------- | | ||
| -o/--output | Specifies the output folder to use. Defaults to `./out`. | | ||
| -v/--version | Specifies the ubuntu version to download. Defaults to `bionic`. | | ||
| -s/--image-size | Specifies the size of the root fs to create. Defaults to `10G`. | | ||
|
||
The processed files (i.e. root filesystem, uncompressed kernel, initrd) can be used directly with Firecracker without flintlock. | ||
|
||
> As an alternative using the download script you can use [debootstrap](https://wiki.debian.org/Debootstrap) by running `sudo debootstrap bionic ./out/images/mount > /dev/null`. The commands in the following sections may need to be adapted. | ||
## Building a volume container image | ||
|
||
1. Run the following to mount the downloaded and processed root filesystem: | ||
|
||
```shell | ||
mkdir -p out/images/mount | ||
sudo mount -o loop out/images/bionic/bionic.rootfs ./out/images/mount | ||
``` | ||
|
||
2. Run the following to create the container image (replacing `myorg/ubuntu-bionic-volume:v0.0.1` with your required container image name/tag): | ||
|
||
```shell | ||
sudo tar -C ./out/images/mount -c . | docker import - myorg/ubuntu-bionic-volume:v0.0.1 | ||
docker push myorg/ubuntu-bionic-volume:v0.0.1 | ||
``` | ||
|
||
## Building a Kernel/Initrd container image | ||
|
||
1. Create a Dockerfile that adds the uncompressed kernel and initrd. For example: | ||
|
||
```dockerfile | ||
FROM scratch | ||
|
||
COPY vmlinux initrd-generic / | ||
``` | ||
|
||
2. Use docker build and then push | ||
[site]: https://docs.flintlock.dev/docs/guides/images |
Oops, something went wrong.