Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(examples): Improve http-python3.10 README #68

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 8 additions & 15 deletions examples/http-python3.10/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ To run this example, [install Unikraft's companion command-line toolchain `kraft
Use `kraft` to run the image and start a Unikraft instance:

```bash
kraft run -p 8080:8080 --plat qemu --arch x86_64
kraft run --rm -p 8080:8080 --plat qemu --arch x86_64
```

If the `--plat` argument is left out, it defaults to `qemu`.
If the `--arch` argument is left out, it defaults to your system's CPU architecture.

Once executed, it will open port `8080` and wait for connections.
Once executed, it will open port `8080` and wait for connections.
To test it, you can use `curl`:

```bash
Expand All @@ -39,32 +39,25 @@ nostalgic_snowflake oci://unikraft.org/python:3.10 /server.py 46 seconds ago
```

The instance name is `nostalgic_snowflake`.
To close the Unikraft instance, use:
To close the Unikraft instance, close the `kraft` process (e.g., via `Ctrl+c`) or run:

```bash
kraft rm nostalgic_snowflake
```

Note that closing the `kraft run` command (e.g., via `Ctrl+c`) does not kill the Unikraft instance.
If you want the Unikraft instance closed when closing the `kraft run` command, use the `--rm` option:

```bash
kraft run --rm -p 8080:8080 --plat qemu --arch x86_64
```

Finally, note that depending on how you modify this example your instance **may** need more memory to run.
Note that depending on how you modify this example your instance **may** need more memory to run.
To do so, use the `kraft run`'s `-M` flag, for example:

```bash
kraft run -p 8080:8080 --plat qemu --arch x86_64 -M 512M
```

## kraft and sudo
## `kraft` and `sudo`

Mixing invocations of kraft and sudo can lead to unexpected behavior.
Read more about how to start kraft without sudo at [https://unikraft.org/sudoless](https://unikraft.org/sudoless).
Mixing invocations of `kraft` and `sudo` can lead to unexpected behavior.
Read more about how to start `kraft` without `sudo` at [https://unikraft.org/sudoless](https://unikraft.org/sudoless).

## Learn More

- [How to run unikernels locally](https://unikraft.org/docs/cli/running)
- [How to build `Dockerfile` root filesystems with BuildKit](https://unikraft.org/docs/getting-started/integrations/buildkit)
- [Building `Dockerfile` Images with `BuildKit`](https://unikraft.org/docs/getting-started/integrations/buildkit)
Loading