coder/examples/templates/incus
Mathias Fredriksson 5dd436c19b
feat(examples): add linting to all examples (#12595)
Fixes #12588
2024-03-14 16:49:44 +02:00
..
README.md feat(examples): add linting to all examples (#12595) 2024-03-14 16:49:44 +02:00
main.tf chore(examples): add sample Incus template (#12114) 2024-02-13 14:30:31 +00:00

README.md

display_name description icon maintainer_github verified tags
Incus System Container with Docker Develop in an Incus System Container with Docker using incus ../../../site/static/icon/lxc.svg coder true
local
incus
lxc
lxd

Incus System Container with Docker

Develop in an Incus System Container and run nested Docker containers using Incus on your local infrastructure.

Prerequisites

  1. Install Incus on the same machine as Coder.

  2. Allow Coder to access the Incus socket.

    • If you're running Coder as system service, run sudo usermod -aG incus-admin coder and restart the Coder service.

    • If you're running Coder as a Docker Compose service, get the group ID of the incus-admin group by running getent group incus-admin and add the following to your compose.yaml file:

      services:
        coder:
          volumes:
            - /var/lib/incus/unix.socket:/var/lib/incus/unix.socket
          group_add:
            - 996 # Replace with the group ID of the `incus-admin` group
      
  3. Create a storage pool named coder and btrfs as the driver by running incus storage create coder btrfs.

Usage

Note: this template requires using a container image with cloud-init installed such as ubuntu/jammy/cloud/amd64.

  1. Run coder templates init -id incus
  2. Select this template
  3. Follow the on-screen instructions

Extending this template

See the lxc/incus Terraform provider documentation to add the following features to your Coder template:

  • HTTPS incus host
  • Volume mounts
  • Custom networks
  • More

We also welcome contributions!