File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -18,10 +18,11 @@ custom_image=""
18
18
tty=()
19
19
remove=" "
20
20
cleanup=" "
21
+ mounts=()
21
22
22
23
usage () {
23
24
echo " Usage:"
24
- echo " $0 [-t] [-v <version>] [-V <SDK version>] [-a <amd64|arm64|all>] [-n <name> ] [-x <script>] [-C <custom-container>] [--rm] [-U] [<container-command>]"
25
+ echo " $0 [-t] [-v <version>] [-V <SDK version>] [-a <amd64|arm64|all>] [-n <name> ] [-x <script>] [-C <custom-container>] [--rm] [-U] [-m <src>:<dest>] [ <container-command>]"
25
26
echo " Start an SDK container of a given SDK release version."
26
27
echo " This will create the container if it does not exist, otherwise start the existing container."
27
28
echo " If the container is already running then it will exec into the container."
@@ -46,6 +47,8 @@ usage() {
46
47
echo " $sdk_container_common_registry /flatcar-sdk-[ARCH]:[SDK VERSION]."
47
48
echo " Useful for CI."
48
49
echo " -U Do not update the versionfile. Instead, use the version from the versionfile as-is."
50
+ echo " -m <src>:<dest> - Mount local file or directory inside the container."
51
+ echo " Can be specified multiple times."
49
52
echo " -h Print this help."
50
53
echo
51
54
}
@@ -68,6 +71,7 @@ while [[ $# -gt 0 ]] ; do
68
71
os_version=$( get_version_from_versionfile)
69
72
update_versionfile=
70
73
shift ;;
74
+ -m) mounts+=( -v " $2 " ); shift ; shift ;;
71
75
* ) break ;;
72
76
esac
73
77
done
@@ -138,6 +142,7 @@ if [[ -z ${stat} ]] ; then
138
142
-v " ${PWD} /__build__/images:/mnt/host/source/src/build"
139
143
-v " ${PWD} :/mnt/host/source/src/scripts"
140
144
" ${gpg_volumes[@]} "
145
+ " ${mounts[@]} "
141
146
--privileged
142
147
--network host
143
148
-e SDK_USER_ID=" $( id -u) "
You can’t perform that action at this time.
0 commit comments