Skip to content

Commit

Permalink
docker image: Copy the cheribuild configuration to the home directory
Browse files Browse the repository at this point in the history
  • Loading branch information
arichardson committed Mar 23, 2022
1 parent 3210bac commit 50371d2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ fi
addgroup --quiet --gid ${cheribuild_gid} "${cheribuild_user}"
useradd --uid "${cheribuild_uid}" --gid "${cheribuild_gid}" --create-home --no-user-group --password '*' "${cheribuild_user}"

# Run the actual command:
# Copy the cheribuild configuration to the unprivileged user's home directory:
export HOME="/home/${cheribuild_user}"
mkdir "${HOME}/.config"
cp -f /root/.config/cheribuild.json "${HOME}/.config/cheribuild.json"
chown -R "${cheribuild_uid}:${cheribuild_gid}" "${HOME}/.config"
# Run the actual command:
exec gosu "${cheribuild_user}" "$@"

0 comments on commit 50371d2

Please sign in to comment.