Skip to content

Commit

Permalink
Merge pull request #26 from dfaggioli/user-mode
Browse files Browse the repository at this point in the history
Avoid copying the user setup script with 'podman cp'
  • Loading branch information
thkukuk authored Mar 5, 2021
2 parents daeb191 + 6999177 commit ca2bc53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion toolbox
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ if ! command -v sudo &> /dev/null ; then
fi
mkdir -p /etc/sudoers.d/ && echo "${USER_NAME} ALL = (root) NOPASSWD:ALL" > /etc/sudoers.d/${USER_NAME}
EOF
${SUDO} podman cp "${tmp_user_setup}" "${TOOLBOX_NAME}":"${tmp_user_setup}"
${SUDO} podman exec --user root "${TOOLBOX_NAME}" bash "${tmp_user_setup}" &> "${tmp_user_setup_log}"
${SUDO} podman exec --user root "${TOOLBOX_NAME}" rm "${tmp_user_setup}"
fi
Expand All @@ -127,6 +126,7 @@ run() {

cleanup() {
${SUDO} podman stop "$TOOLBOX_NAME" &>/dev/null
${SUDO} rm -f $tmp_user_setup
}

container_exists() {
Expand Down

0 comments on commit ca2bc53

Please sign in to comment.