Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@shawty
Last active July 28, 2022 15:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shawty/e14d6c2555e0e7ab7da4e284b2e32e04 to your computer and use it in GitHub Desktop.
Save shawty/e14d6c2555e0e7ab7da4e284b2e32e04 to your computer and use it in GitHub Desktop.
LXD Profile to add to your LXD install, allowing the creation of lightweight DOTNET 6 containers when using "lxc launch" (EG: lxc launch ubuntu mycontainer -p dotnet) , you can add this profile to LXD using the following command: "cat dotnet.profile | lxc profile edit dotnet" from the ubuntu command line.
config:
user.user-data: |
#cloud-config
apt:
preserve_sources_list: true
sources:
microsoft:
keyserver: https://packages.microsoft.com/keys/microsoft.asc
keyid: BC52 8686 B50D 79E3 39D3 721C EB3E 94AD BE12 29CF
source: 'deb https://packages.microsoft.com/ubuntu/20.04/prod focal main'
package_update: true
package_upgrade: true
package_reboot_if_required: true
packages:
- apt-transport-https
- mc
- git
- dotnet-sdk-6.0
users:
- name: shawty
ssh-authorized-keys:
- ssh-rsa ......
sudo: ['ALL=(ALL) NOPASSWD:ALL']
groups: sudo
shell: /bin/bash
final_message:
- "Container initialisation finished."
description: Provision UB20.04 with .NET SDK V6
devices:
eth0:
name: eth0
nictype: bridged
parent: br0
type: nic
root:
path: /
pool: default
type: disk
name: dotnet
used_by: []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment