Skip to content

Commit

Permalink
hack 9
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-noland committed Oct 23, 2024
1 parent 0c91565 commit 8d2ba2f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,12 @@ compile-env *args: fill-out-dev-env-template
ln -s /nix "${tmp_link}/nix"
docker run \
--rm \
--read-only \
--name dataplane-compile-env \
--tmpfs /tmp:uid=$(id -u),gid=$(id -g),nodev,noexec,nosuid \
--mount type=tmpfs,destination=${HOME},tmpfs-mode=1777 \
--mount type=bind,source="$(pwd),destination=/work,bind-propagation=rprivate" \
--mount type=bind,source="${tmp_link},destination=/work/compile-env,bind-propagation=rprivate" \
--mount type=bind,source="$(pwd),destination=/work,bind-propagation=rprivate,readonly" \
--mount type=bind,source="${tmp_link},destination=/work/compile-env,bind-propagation=rprivate,readonly" \
--mount type=bind,source=$(pwd)/dev-env-template/etc/passwd,destination=/etc/passwd,readonly \
--mount type=bind,source=$(pwd)/dev-env-template/etc/group,destination=/etc/group,readonly \
--mount type=bind,source="${tmp_targetdir},destination=/work/target,bind-propagation=rprivate" \
Expand Down Expand Up @@ -282,6 +283,7 @@ fill-out-dev-env-template:
declare -rxi UID
GID="$(id -g)"
declare -rxi GID
declare -rx USER="${USER:-builder}"
envsubst < dev-env-template/etc.template/group.template > dev-env-template/etc/group
envsubst < dev-env-template/etc.template/passwd.template > dev-env-template/etc/passwd

Expand Down

0 comments on commit 8d2ba2f

Please sign in to comment.