Skip to content

Commit

Permalink
add temp workaround for cd going to home
Browse files Browse the repository at this point in the history
  • Loading branch information
glemieux committed Sep 6, 2024
1 parent cbe026d commit 7248095
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
8 changes: 8 additions & 0 deletions docker/elm/elm_v3-for-ngee/.bashcd
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
cd() {
if [ -z "$1" ]; then
builtin cd /
else
builtin cd "$1"
fi
}
6 changes: 5 additions & 1 deletion docker/elm/elm_v3-for-ngee/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,14 @@ RUN cd /inventorydata \
&& mkdir -p userdata \
&& chown $USER bci \
&& chown $USER inventory_ctrl \
&& chown $USER userdata
&& chown $USER userdata \
&& cd / \
&& chmod -R 777 /inventorydata

# Change cd builtin behavior
ADD .bashcd /home/${USER}
RUN echo "source $HOME/.bashcd" >> .bashrc

# Set user
USER ${USER}
RUN export USER=${USER}
Expand Down

0 comments on commit 7248095

Please sign in to comment.