-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJustfile
More file actions
60 lines (52 loc) · 1.54 KB
/
Justfile
File metadata and controls
60 lines (52 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
build:
docker buildx build \
--progress=plain \
--build-arg UID=$(id -u) \
--build-arg GID=$(id -g) \
--build-arg USERNAME=$(whoami) \
-t rgpeach10/shell:local \
. \
--load
run-local:
docker run -it --rm \
--user $(id -u) \
-v $HOME:/home/$(whoami)/mnt \
-v /var/run/docker.sock:/var/run/docker.sock \
-e GITHUB_TOKEN=$(gh auth token) \
--pull=always \
rgpeach10/shell:local
run-remote tag="local":
docker run -it --rm \
--user $(id -u) \
-v $HOME:/home/$(whoami)/mnt \
-v /var/run/docker.sock:/var/run/docker.sock \
-e GITHUB_TOKEN=$(gh auth token) \
--pull=always \
rgpeach10/shell:{{tag}}
build-all tag="local":
docker buildx build \
--progress=plain \
--build-arg UID=$(id -u) \
--build-arg GID=$(id -g) \
--build-arg USERNAME=$(whoami) \
-t rgpeach10/shell:{{tag}} \
--platform linux/amd64,linux/arm64 \
. \
--push
test:
just build
just run-local
clean:
docker image prune -f
docker container prune -f
docker system prune -f
docker volume prune -f
push-local: build
echo $(git symbolic-ref --short HEAD | sed 's/\//__/g')
docker tag rgpeach10/shell:local rgpeach10/shell:$(git symbolic-ref --short HEAD | sed 's/\//__/g')
docker push rgpeach10/shell:$(git symbolic-ref --short HEAD | sed 's/\//__/g')
stow:
stow -t $HOME home
stow-hard:
stow -t $HOME --adopt home
git reset --hard