Skip to content

Commit 02d3c22

Browse files
committed
Make this a bit simpler and document it
1 parent 20bcb89 commit 02d3c22

4 files changed

Lines changed: 5 additions & 6 deletions

File tree

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,5 +201,7 @@ ENV TERM=xterm-256color
201201
# Entrypoint must run as root to modify the user
202202
COPY entrypoint.sh /entrypoint.sh
203203
USER root
204+
WORKDIR /home/${USERNAME}/mnt
205+
ENV MNT=/home/${USERNAME}/mnt
204206
ENTRYPOINT ["/entrypoint.sh"]
205207
CMD ["/bin/zsh"]

Justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
build:
2-
docker buildx build --progress=plain -t rgpeach10/shell:local . --load
2+
docker buildx build --progress=plain -t rgpeach10/shell:local --no-cache . --load
33

44
run-local:
55
docker run -it --rm \

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,9 @@ Create a `~/.docker-shell.sh` file with the following contents:
3737
#!/usr/bin/env bash
3838

3939
docker run -it --rm \
40-
-v $HOME/.ssh:/home/root/.ssh \
41-
-v $HOME:/home/root/mnt \
40+
-v $HOME:/home/rgpeach10/mnt \
4241
-v /var/run/docker.sock:/var/run/docker.sock \
43-
-w /home/root/mnt \
4442
-e GITHUB_TOKEN=$(gh auth token) \
45-
-e MNT=/home/rgpeach10/mnt \
4643
--pull=always \
4744
rgpeach10/shell:main
4845
```

entrypoint.sh

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set -e
33

44
TARGET_UID=${TARGET_UID:-1000}
55
TARGET_GID=${TARGET_GID:-1000}
6-
USERNAME=rgpeach10
6+
USERNAME=${USERNAME:-rgpeach10}
77

88
CURRENT_UID=$(id -u "$USERNAME")
99
CURRENT_GID=$(id -g "$USERNAME")

0 commit comments

Comments
 (0)