Skip to content

Commit

Permalink
Make bindfs mapping bidirectional, remove host USER name from env (#901)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuru authored Jan 12, 2024
1 parent 801d8ab commit 411dc9b
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/label.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Labeler
on: [pull_request]
on: [pull_request_target]

jobs:
label:
Expand Down
2 changes: 1 addition & 1 deletion os/debian/Dockerfile.debian
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ RUN python3 -m pip install --upgrade --progress-bar off pip setuptools wheel &&
pip install --progress-bar off -r /requirements.txt --prefix=/usr/local --no-build-isolation

# Remove Python cache files
RUN find / -name __pycache__ -exec rm -rf {} \; -prune
RUN find / -xdev -name __pycache__ -exec rm -rf {} \; -prune

#
# Geodesic base image
Expand Down
2 changes: 1 addition & 1 deletion rootfs/etc/profile.d/_20-localhost.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if [[ $SHLVL == 1 ]] && [[ -n $GEODESIC_HOST_UID ]] && [[ -n $GEODESIC_HOST_GID
red "# * Verify that content under /localhost is what you expect."
red "# * Report the issue at https://github.com/cloudposse/geodesic/issues"
red "# * Include the output of \`env | grep GEODESIC\` and \`df -a\` in your issue description."
elif bindfs -o nonempty ${GEODESIC_BINDFS_OPTIONS} --create-for-user="$GEODESIC_HOST_UID" --create-for-group="$GEODESIC_HOST_GID" "${GEODESIC_LOCALHOST}" /localhost; then
elif bindfs -o nonempty ${GEODESIC_BINDFS_OPTIONS} "--map=${GEODESIC_HOST_UID}/0:@${GEODESIC_HOST_GID}/@0" "${GEODESIC_LOCALHOST}" /localhost; then
green "# BindFS mapping of ${GEODESIC_LOCALHOST} to /localhost enabled."
green "# Files created under /localhost will have UID:GID ${GEODESIC_HOST_UID}:${GEODESIC_HOST_GID} on host."
export GEODESIC_LOCALHOST_MAPPED_DEVICE="${GEODESIC_LOCALHOST}"
Expand Down
8 changes: 0 additions & 8 deletions rootfs/etc/profile.d/user.sh

This file was deleted.

1 change: 0 additions & 1 deletion rootfs/templates/wrapper
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ function use() {
--env SSH_CLIENT
--env SSH_CONNECTION
--env SSH_TTY
--env USER
--env USER_ID
--env GROUP_ID)
elif [ "${OS}" == 'Darwin' ] && [ "${GEODESIC_MAC_FORWARD_SOCKET}" == 'true' ]; then
Expand Down

0 comments on commit 411dc9b

Please sign in to comment.