Repository navigation
Replies: 5 comments 50 replies
|
Binaries need to compiled for termux. Linux distros binaries mostly won't run on termux without patches. https://github.com/termux/termux-packages/wiki/Building-packages You would also require root to run https://github.com/termux/termux-packages/tree/master/root-packages/containerd |
|
Ok, so I've unlinked a file from examples |
|
@wviana have you tryed using an imge for |
|
just compile it in termux build env like this TERMUX_PKG_HOMEPAGE=https://github.com/lima-vm/lima
TERMUX_PKG_DESCRIPTION="Linux virtual machines, with a focus on running containers"
TERMUX_PKG_LICENSE="Apache-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="0.20.1"
TERMUX_PKG_SRCURL=https://github.com/lima-vm/lima/archive/refs/tags/v$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=3e8b16572a23d69ad16ef72f15b1697c35b5eacaf6c1f0943b6ebfb8bfaf1fd7
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_BUILD_IN_SRC=true
termux_step_make() {
termux_setup_golang
export GOPATH=$TERMUX_PKG_CACHEDIR/go
make binaries
}
termux_step_make_install() {
install -Dm700 -t $TERMUX_PREFIX/bin $TERMUX_PKG_SRCDIR/_output/bin/*
install -Dm700 -t $TERMUX_PREFIX/bin $TERMUX_PKG_SRCDIR/_output/share/lima/lima-guestagent.Linux-aarch64
}you will get deb file in # This template requires Lima v0.7.0 or later.
# Using the Alpine 3.19 aarch64 image with vmType=vz requires macOS Ventura 13.3 or later.
images:
- location: "https://github.com/lima-vm/alpine-lima/releases/download/v0.2.37/alpine-lima-rd-3.19.0-aarch64.iso"
arch: "aarch64"
digest: "sha512:8e41de22f9b3f6fc26df70ce8cce1b7698b0eb3fb13071c47965518472875270705a1a45bac0d22ad0ea6338a82e9e4c5cdbbef51df4aba08bedcdae30baa3a0"
mounts:
- location: "~"
writable: true
- location: "~/tmp/lima"
writable: true
# The built-in containerd installer does not support Alpine currently.
# Hint: use the "rd" ISO instead of the "std" ISO to enable containerd: https://github.com/lima-vm/alpine-lima/releases/
containerd:
system: false
user: false
provision:
- mode: system
# This script defines the host.docker.internal hostname when hostResolver is disabled.
# It is also needed for lima 0.8.2 and earlier, which does not support hostResolver.hosts.
# Names defined in /etc/hosts inside the VM are not resolved inside containers when
# using the hostResolver; use hostResolver.hosts instead (requires lima 0.8.3 or later).
script: |
#!/bin/sh
sed -i 's/host.lima.internal.*/host.lima.internal host.docker.internal/' /etc/hosts
- mode: system
script: |
#!/bin/bash
set -eux -o pipefail
addgroup {{.User}} docker
rc-update add docker default
service docker start
- script: |
#!/bin/bash
set -eux -o pipefail
if ! timeout 30s bash -c "until command -v docker >/dev/null 2>&1; do sleep 3; done"; then
echo >&2 "docker is not installed yet"
exit 1
fi
if ! timeout 30s bash -c "until pgrep dockerd; do sleep 3; done"; then
echo >&2 "dockerd is not running"
exit 1
fi
hint: See "/var/log/cloud-init-output.log". in the guest
hostResolver:
# hostResolver.hosts requires lima 0.8.3 or later. Names defined here will also
# resolve inside containers, and not just inside the VM itself.
hosts:
host.docker.internal: host.lima.internal
portForwards:
- guestSocket: "/var/run/docker.sock"
hostSocket: "{{.Dir}}/sock/docker.sock"
message: |
To run `docker` on the host (assumes docker-cli is installed), run the following commands:
------
docker context create lima-{{.Name}} --docker "host=unix://{{.Dir}}/sock/docker.sock"
docker context use lima-{{.Name}}
docker run hello-world
------ |
|
I created my own tool for this, it's a simpler, more focused tool to help setting up docker on termux. |
Uh oh!
There was an error while loading. Please reload this page.
Hello. I'm trying to get Lima running on termux.
I've opened This discussion in Lima discussion but didn't get any answer.
I've installed kind using prefix. It's in $PREFIX/bin. But when I try to run it I get a command not found. Even after cd into $PREFIX/bin and try ./limactl I get a no such a file or directory.
Any help on this?
All reactions