mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-12-04 07:06:05 +00:00
Add basic database setup for AWS, GCP although these are not yet used by the setup code but will be useful later. Currently each is gated by `mobyplatform` but this can be removed once we construct Moby per platform, and once these are containerised so they are not run from `openrc`. Signed-off-by: Justin Cormack <justin.cormack@docker.com>
23 lines
536 B
Plaintext
Executable File
23 lines
536 B
Plaintext
Executable File
#!/sbin/openrc-run
|
|
|
|
description="Set up database (OSX)."
|
|
|
|
depend() {
|
|
before docker hostsettings windowsnet
|
|
}
|
|
|
|
start() {
|
|
[ "$(mobyplatform)" = "mac" ] || exit 0
|
|
|
|
ebegin "Setting up database (OSX)"
|
|
|
|
mkdir -p /Database
|
|
mount -t tmpfs tmpfs /Database
|
|
mkdir -p /tmp/db
|
|
mount -t 9p -o trans=virtio,dfltuid=1001,dfltgid=50,version=9p2000 db /tmp/db
|
|
[ $? -ne 0 ] && rm -rf /Database && printf "Could not mount configuration database\n" 1>&2 && eend 1
|
|
cp -a /tmp/db/branch/master/ro/com.docker.driver.amd64-linux/* /Database
|
|
|
|
eend 0
|
|
}
|