File tree Expand file tree Collapse file tree 3 files changed +46
-0
lines changed Expand file tree Collapse file tree 3 files changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ binaries: clean \
21
21
_output/bin/lima \
22
22
_output/bin/limactl \
23
23
_output/bin/nerdctl.lima \
24
+ _output/bin/docker.lima \
25
+ _output/bin/podman.lima \
24
26
_output/share/lima/lima-guestagent.Linux-x86_64 \
25
27
_output/share/lima/lima-guestagent.Linux-aarch64 \
26
28
_output/share/lima/lima-guestagent.Linux-riscv64
@@ -40,6 +42,14 @@ _output/bin/nerdctl.lima:
40
42
mkdir -p _output/bin
41
43
cp -a ./cmd/nerdctl.lima $@
42
44
45
+ _output/bin/docker.lima : ./cmd/docker.lima
46
+ @mkdir -p _output/bin
47
+ cp -a $^ $@
48
+
49
+ _output/bin/podman.lima : ./cmd/podman.lima
50
+ @mkdir -p _output/bin
51
+ cp -a $^ $@
52
+
43
53
.PHONY : _output/bin/limactl
44
54
_output/bin/limactl :
45
55
# The hostagent must be compiled with CGO_ENABLED=1 so that net.LookupIP() in the DNS server
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ set -eu
3
+ : " ${LIMA_INSTANCE:= docker} "
4
+ : " ${DOCKER:= docker} "
5
+
6
+ if [ " $( limactl ls -q " $LIMA_INSTANCE " 2> /dev/null) " != " $LIMA_INSTANCE " ]; then
7
+ echo " instance \" $LIMA_INSTANCE \" does not exist, run \` limactl start --name=$LIMA_INSTANCE template://docker\` to create a new instance" >&2
8
+ exit 1
9
+ fi
10
+ DOCKER=$( command -v " $DOCKER " || true)
11
+ if [ -n " $DOCKER " ]; then
12
+ DOCKER_HOST=$( limactl list " $LIMA_INSTANCE " --format ' unix://{{.Dir}}/sock/docker.sock' )
13
+ export DOCKER_HOST
14
+ exec " $DOCKER " " $@ "
15
+ else
16
+ export LIMA_INSTANCE
17
+ exec lima docker " $@ "
18
+ fi
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ set -eu
3
+ : " ${LIMA_INSTANCE:= podman} "
4
+ : " ${PODMAN:= podman} "
5
+
6
+ if [ " $( limactl ls -q " $LIMA_INSTANCE " 2> /dev/null) " != " $LIMA_INSTANCE " ]; then
7
+ echo " instance \" $LIMA_INSTANCE \" does not exist, run \` limactl start --name=$LIMA_INSTANCE template://podman\` to create a new instance" >&2
8
+ exit 1
9
+ fi
10
+ PODMAN=$( command -v " $PODMAN " || true)
11
+ if [ -n " $PODMAN " ]; then
12
+ CONTAINER_HOST=$( limactl list " $LIMA_INSTANCE " --format ' unix://{{.Dir}}/sock/podman.sock' )
13
+ export CONTAINER_HOST
14
+ exec " $PODMAN " --remote " $@ "
15
+ else
16
+ export LIMA_INSTANCE
17
+ exec lima podman " $@ "
18
+ fi
You can’t perform that action at this time.
0 commit comments