mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
fakelogin populates /var/run/utmp enough such that getlogin() works, and is included in the latest Docker image. Run `docker pull andschwa/magrathea` to update.
10 lines
360 B
Bash
Executable File
10 lines
360 B
Bash
Executable File
#!/usr/bin/env sh
|
|
|
|
# Docker requires the volume path to be absolute... so we resolve it ourselves.
|
|
docker run --rm --interactive --tty \
|
|
--volume $(dirname $(pwd))/:/opt/monad \
|
|
--workdir /opt/monad/scripts \
|
|
andschwa/magrathea:latest \
|
|
bash -c "/opt/fakelogin; $*"
|
|
# we use $* over $@ so that multi-word parameters aren't split up
|