@@ -77,9 +77,12 @@ Note: *You should run this command as non-root*
7777
7878It's also fully supported to use ` podman ` as root, but some of the arguments
7979here need to change for that.
80+ Save the following shell in /usr/local/bin/cosa and run ` sudo chmod 755 /usr/local/bin/cosa ` .
8081
81- {% raw %}
8282``` sh
83+
84+ #! /bin/bash
85+
8386cosa () {
8487 env | grep COREOS_ASSEMBLER
8588 local -r COREOS_ASSEMBLER_CONTAINER_LATEST=" quay.io/coreos-assembler/coreos-assembler:latest"
@@ -100,15 +103,17 @@ cosa() {
100103 --userns=keep-id:uid=1000,gid=1000 \
101104 -v=${PWD} :/srv/ --device=/dev/kvm --device=/dev/fuse \
102105 --tmpfs=/tmp -v=/var/tmp:/var/tmp --name=cosa \
106+ ${NO_KVM: +-e COSA_NO_KVM=$NO_KVM } \
103107 ${COREOS_ASSEMBLER_CONFIG_GIT: +-v=$COREOS_ASSEMBLER_CONFIG_GIT :/ srv/ src/ config/: ro} \
104108 ${COREOS_ASSEMBLER_GIT: +-v=$COREOS_ASSEMBLER_GIT / src/:/ usr/ lib/ coreos-assembler/: ro} \
105109 ${COREOS_ASSEMBLER_ADD_CERTS: +-v=/ etc/ pki/ ca-trust:/ etc/ pki/ ca-trust: ro} \
106110 ${COREOS_ASSEMBLER_CONTAINER_RUNTIME_ARGS} \
107111 ${COREOS_ASSEMBLER_CONTAINER:- $COREOS_ASSEMBLER_CONTAINER_LATEST } " $@ "
108112 rc=$? ; set +x; return $rc
109113}
114+
115+ cosa " $@ "
110116```
111- {% endraw %}
112117
113118This is a bit more complicated than a simple alias, but it allows for
114119hacking on the assembler or the configs and prints out the environment and
@@ -141,6 +146,7 @@ The environment variables are special purpose:
141146 signed by an authority outside the default bundle already trusted by the
142147 host. Alternatively, one can use ` cosa shell ` as described below to have a
143148 persistent container in which you can set up the root CA once.
149+ - ` NO_KVM ` : If you are running in a virtual machine that doesn't support nested virtualization, set ` NO_KVM=1 ` .
144150
145151See the [ Working on CoreOS Assembler] ( devel.md ) page for examples of how
146152to use these variables.
0 commit comments