Skip to content

Commit

Permalink
feat: set default USER to dapp in init script
Browse files Browse the repository at this point in the history
  • Loading branch information
edubart committed Mar 19, 2024
1 parent e4fd683 commit eee9b67
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ RUN apt-get update && \
jq=1.6-2.1ubuntu3 \
lua5.4=5.4.4-1 \
lua-socket=3.0~rc1+git+ac3201d-6 \
xxd=2:8.2.3995-1ubuntu2.15 \
xxd=2:8.2.3995-1ubuntu2.16 \
file=1:5.41-3ubuntu0.1 \
/tmp/${TOOLS_DEB} \
&& \
Expand Down
3 changes: 2 additions & 1 deletion sys-utils/cartesi-init/cartesi-init
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ fi

# is entrypoint not empty?
if [ -n "$ENTRYPOINT" ]; then
USER=${USER:-root}
# set default user to "dapp" if available, otherwise fallback to root
USER=${USER:-$(busybox id -un dapp 2>/dev/null || echo root)}
HOME=$(eval echo ~$USER)
WORKDIR=${WORKDIR:-"$HOME"}

Expand Down

0 comments on commit eee9b67

Please sign in to comment.