forked from emacs-eldev/eldev
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
af8975a
commit aadfcd7
Showing
5 changed files
with
62 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM silex/emacs:27.2-ci-eldev | ||
|
||
RUN set -eux; \ | ||
apt-get update; \ | ||
apt-get install -y gosu; \ | ||
rm -rf /var/lib/apt/lists/*; \ | ||
# verify that the binary works | ||
gosu nobody true | ||
|
||
COPY entrypoint.sh /usr/local/bin/entrypoint.sh | ||
|
||
RUN chmod +x /usr/local/bin/entrypoint.sh | ||
|
||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
|
||
# Default value for USER_ID | ||
USER_ID=${LOCAL_USER_ID:-9001} | ||
echo "USERNAME: $USERNAME, UID: $USER_ID" | ||
|
||
# Create User | ||
useradd --shell /bin/bash -u $USER_ID -d /home/$USERNAME -o -c "" $USERNAME | ||
|
||
# Create Directory only if it doesn't exist | ||
# This prevents the issue - useradd: warning: the home directory already exists. | ||
if [ ! -d "/home/$USERNAME" ]; then | ||
mkdir /home/$USERNAME | ||
fi | ||
|
||
cp -r /root/.eldev /home/$USERNAME | ||
chown -R $USER_ID:$USER_ID /home/$USERNAME | ||
export PATH=$PATH:/home/$USERNAME/.eldev/bin | ||
|
||
# Execute the process as the given user | ||
exec /usr/sbin/gosu $USERNAME "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
(eldev-use-package-archive `("archive-a" . ,(expand-file-name "../package-archive-a"))) | ||
|
||
(setq eldev-docker-run-extra-args | ||
`("-v" ,(concat (expand-file-name "../package-archive-a/") | ||
":/package-archive-a"))) | ||
`("-v" ,(format "%s:%s" | ||
(expand-file-name "../package-archive-a/") | ||
(expand-file-name "../package-archive-a/")))) |