Skip to content

Commit 2f2481d

Browse files
committed
use undock in lima
Signed-off-by: Paweł Gronowski <[email protected]>
1 parent 29f6d0a commit 2f2481d

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

src/docker/assets.ts

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -224,20 +224,26 @@ provision:
224224
if [ {{srcType}} == "archive" ]; then
225225
curl -fsSL https://get.docker.com | sh -s -- --channel {{srcArchiveChannel}} --version {{srcArchiveVersion}}
226226
elif [ {{srcType}} == "image" ]; then
227+
arch=$(uname -m)
228+
case $arch in
229+
x86_64) arch=amd64;;
230+
aarch64) arch=arm64;;
231+
esac
232+
url="https://github.com/crazy-max/undock/releases/download/v0.8.0/undock_0.8.0_linux_$arch.tar.gz"
233+
234+
wget "$url" -O /tmp/undock.tar.gz
235+
tar -C /usr/local/bin -xvf /tmp/undock.tar.gz
236+
undock --version
237+
238+
undock moby/moby-bin:{{srcImageTag}} /usr/local/bin
239+
227240
wget https://raw.githubusercontent.com/moby/moby/{{srcImageTag}}/contrib/init/systemd/docker.service \
228241
https://raw.githubusercontent.com/moby/moby/v{{srcImageTag}}/contrib/init/systemd/docker.service \
229242
-O /etc/systemd/system/docker.service || true
230243
wget https://raw.githubusercontent.com/moby/moby/{{srcImageTag}}/contrib/init/systemd/docker.socket \
231244
https://raw.githubusercontent.com/moby/moby/v{{srcImageTag}}/contrib/init/systemd/docker.socket \
232245
-O /etc/systemd/system/docker.socket || true
233246
234-
mount
235-
ls -lah /tmp/lima || true
236-
ls -lah {{toolDir}} || true
237-
238-
mkdir -p /usr/local/bin
239-
cp {{toolDir}}/* /usr/local/bin/
240-
241247
sed -i 's|^ExecStart=.*|ExecStart=/usr/local/bin/dockerd -H fd://|' /etc/systemd/system/docker.service
242248
sed -i 's|containerd.service||' /etc/systemd/system/docker.service
243249
if ! getent group docker; then

0 commit comments

Comments
 (0)