Skip to content
hazelcaffePublic

About

Docker without the Docker

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lucy

Docker without the Docker

Lucy converts any Docker "project" (compose, single image, or docker run command) into a self-contained bundle. The bundle can be packed into a bash script that you can run on any host. No Docker, containerd, or podman required!

Where it runs

Run the install script and Lucy picks a mode based on where it lands:

  • Any Linux box (with systemd) Every service becomes a normal systemd service. This is the default.
  • Proxmox host: Lucy creates one LXC for the whole project and installs it inside. Add --mode multi if you'd rather have one LXC per service.
  • Plain LXC: add --backend lxc to run each service as an LXC container instead of a systemd service.

Each service still gets its own FS, IP, and hostname, same as in Docker.

Setup

You need Linux, Python 3, zstd, and Docker on the machine where you convert (Docker is only used to pull and build images there; the target never needs it).

git clone https://github.com/hazelcaffe/Lucy && cd lucy
./build.sh
./bin/lucy --help

Converting

A compose project:

lucy convert path/to/project --script
lucy convert -f a.yml -f b.yml -p myproject --env-file prod.env --script

A single image:

lucy image nginx:alpine -P 8080:80 --script

A docker run command:

lucy run --script -- docker run -d -p 8080:80 -e FOO=bar -v data:/data nginx

Each of these gives you <project>-install.sh. Leave off --script if you just want the bundle folder.

Installing on the target

Copy the script over and run it as root:

sh myproject-install.sh

On Proxmox, tell it what IP to use (otherwise it uses DHCP):

sh myproject-install.sh --lan-ip 192.168.1.50/24 --lan-gw 192.168.1.1

Other handy options:

  • --mode multi: one LXC per service (Proxmox only)
  • --backend lxc: LXC containers instead of systemd services
  • --replace: install a newer bundle over an existing one and keep all the data
  • --help: everything else

Day to day

Everything is managed with lucy-rt, which lives in /var/lib/lucy/<project>/bin/:

lucy-rt status myproject
lucy-rt logs myproject web -f
lucy-rt exec myproject web -- sh
lucy-rt restart myproject web
lucy-rt down myproject
lucy-rt up myproject
lucy-rt destroy myproject           # removes the services, keeps your data
lucy-rt destroy myproject --purge   # removes everything

On Proxmox you can run these from the host, even though the project lives in its own LXC. Everything comes back on its own after a reboot.

What works

Pretty much everything you'd put in a compose file: environment, volumes, bind mounts, networks with fixed IPs, published ports, healthchecks, depends_on conditions, restart policies, secrets and configs, users, capabilities, limits, network_mode: host and service:..., replicas.

Services find each other by name just like in Docker, and anything that mounts /var/run/docker.sock (Traefik, Portainer, mailcow, ofelia) gets a fake Docker API that controls the converted services.

What doesn't

  • read_only, pid: host, ipc: host and userns_mode are ignored (you get a warning).
  • Host-wide settings like vm.max_map_count have to be set on the host yourself.
  • Images have to match the host's CPU architecture.

Testing

See TESTING.md for what was tested and how.

About

Docker without the Docker

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages