Skip to content

Instantly share code, notes, and snippets.

@Roadmaster
Created October 27, 2017 21:21
Show Gist options
  • Save Roadmaster/717eb41deec014ce64fbb4de3138c813 to your computer and use it in GitHub Desktop.
Save Roadmaster/717eb41deec014ce64fbb4de3138c813 to your computer and use it in GitHub Desktop.
snap-lxc.sh
#!/bin/bash
# Create lxc profile that allows using snaps in the container
NAME=snap
lxc profile create $NAME &> /dev/null || true
cat << EOF | lxc profile edit $NAME
name: $NAME
description: Set up snaposity
config:
security.nesting: "true"
user.vendor-data: |
#cloud-config
packages:
- 'squashfuse'
EOF
# Then
# lxc launch -p default -p $NAME ubuntu:17.10 yor-container
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment