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

docs: Add shell alias and trafe-offs explaination #703

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
20 changes: 20 additions & 0 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,26 @@ sudo podman run --pull=always --privileged --rm \
install /dev/vdb -i config.ign
```

You may also add the following alias your shell configuration:

```sh
alias coreos-installer='podman run --pull=always \
--rm --interactive \
--security-opt label=disable \
--volume ${PWD}:/pwd --workdir /pwd \
quay.io/coreos/coreos-installer:release'
```

If you want to be able to cancel `coreos-installer` downloads, you
will have to add the `--tty` option to your podman comand line or shell alias:
Copy link

@PhrozenByte PhrozenByte Dec 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd advise against using a Bash alias for coreos-installer due to this reason. A script however can easily solve this by simply checking whether a tty is connected to the script and choose accordingly:

#!/bin/sh
if tty -s; then
    podman run … --tty …
else
    podman run … # without --tty
fi

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By the way: This more or less also addresses @lucab's concerns (at least if I understand him right), because with a script it's a matter of $PATH which coreos-installer is used (i.e. the "usual" way), instead of an alias overruling $PATH.


```sh
podmand run ... --rm --interactive --tty ...
```

This will however prevent you from using stdin redirection to embed a
configuration file and stdout capture to get the downloaded image file name.

## Via a Fedora RPM

`coreos-installer` is packaged in Fedora:
Expand Down