prepared dot files
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
FROM archlinux:base-devel
|
||||
|
||||
RUN pacman -Sy --noconfirm stow nodejs npm git sudo \
|
||||
&& useradd -m tester \
|
||||
&& echo 'tester ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
|
||||
|
||||
USER tester
|
||||
WORKDIR /home/tester
|
||||
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
# Disposable Arch container for testing the installer without touching the host.
|
||||
# Usage:
|
||||
# ./docker/test.sh # interactive shell, deps installed
|
||||
# ./docker/test.sh "npx tsc --noEmit" # run one command non-interactively
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
docker build -t dotfiles-test -f docker/Dockerfile .
|
||||
|
||||
tty_flags=(-i)
|
||||
[ -t 0 ] && [ -t 1 ] && tty_flags+=(-t)
|
||||
|
||||
docker run --rm "${tty_flags[@]}" -v "$PWD":/src:ro dotfiles-test \
|
||||
bash -lc 'cp -r /src ~/DotFiles && cd ~/DotFiles && npm install && exec bash -c "$1"' -- "${1:-bash}"
|
||||
Reference in New Issue
Block a user