Some checks failed
LXC-ImageBuilder/Ubuntu/pipeline/head There was a failure building this commit
139 lines
3.3 KiB
YAML
139 lines
3.3 KiB
YAML
image:
|
|
distribution: ubuntu
|
|
|
|
source:
|
|
downloader: debootstrap
|
|
same_as: gutsy
|
|
url: http://192.168.2.83/archive.ubuntu.com/ubuntu
|
|
keyserver: keyserver.ubuntu.com
|
|
keys:
|
|
- 0x790BC7277767219C42C86F933B4FE6ACC0B21F32
|
|
- 0xf6ecb3762474eda9d21b7022871920d1991bc93c
|
|
|
|
targets:
|
|
lxc:
|
|
create-message: |-
|
|
You just created an {{ image.description }} container.
|
|
config:
|
|
- type: all
|
|
before: 5
|
|
content: |-
|
|
lxc.include = LXC_TEMPLATE_CONFIG/ubuntu.common.conf
|
|
|
|
- type: user
|
|
before: 5
|
|
content: |-
|
|
lxc.include = LXC_TEMPLATE_CONFIG/ubuntu.userns.conf
|
|
|
|
- type: all
|
|
after: 4
|
|
content: |-
|
|
lxc.include = LXC_TEMPLATE_CONFIG/common.conf
|
|
|
|
# For Ubuntu 14.04
|
|
lxc.mount.entry = /sys/kernel/debug sys/kernel/debug none bind,optional 0 0
|
|
lxc.mount.entry = /sys/kernel/security sys/kernel/security none bind,optional 0 0
|
|
lxc.mount.entry = /sys/fs/pstore sys/fs/pstore none bind,optional 0 0
|
|
lxc.mount.entry = mqueue dev/mqueue mqueue rw,relatime,create=dir,optional 0 0
|
|
|
|
- type: user
|
|
after: 4
|
|
content: |-
|
|
lxc.include = LXC_TEMPLATE_CONFIG/userns.conf
|
|
|
|
# For Ubuntu 14.04
|
|
lxc.mount.entry = /sys/firmware/efi/efivars sys/firmware/efi/efivars none bind,optional 0 0
|
|
lxc.mount.entry = /proc/sys/fs/binfmt_misc proc/sys/fs/binfmt_misc none bind,optional 0 0
|
|
|
|
- type: all
|
|
content: |-
|
|
lxc.arch = {{ image.architecture_personality }}
|
|
|
|
files:
|
|
- path: /etc/hostname
|
|
generator: hostname
|
|
|
|
- path: /etc/hosts
|
|
generator: hosts
|
|
|
|
- path: /etc/resolvconf/resolv.conf.d/original
|
|
generator: remove
|
|
|
|
- path: /etc/resolvconf/resolv.conf.d/tail
|
|
generator: remove
|
|
|
|
- path: /etc/machine-id
|
|
generator: dump
|
|
|
|
- path: /var/lib/dbus/machine-id
|
|
generator: remove
|
|
|
|
- path: /etc/netplan/10-lxc.yaml
|
|
generator: dump
|
|
content: |-
|
|
network:
|
|
version: 2
|
|
ethernets:
|
|
eth0:
|
|
dhcp4: true
|
|
dhcp-identifier: mac
|
|
types:
|
|
- container
|
|
|
|
packages:
|
|
manager: apt
|
|
update: true
|
|
cleanup: true
|
|
sets:
|
|
- packages:
|
|
- language-pack-en
|
|
- openssh-client
|
|
action: install
|
|
- packages:
|
|
- nano
|
|
action: install
|
|
variants:
|
|
- default
|
|
|
|
repositories:
|
|
- name: sources.list
|
|
url: |-
|
|
deb http://archive.ubuntu.com/ubuntu {{ image.release }} main restricted universe multiverse
|
|
deb http://archive.ubuntu.com/ubuntu {{ image.release }}-updates main restricted universe multiverse
|
|
deb http://security.ubuntu.com/ubuntu {{ image.release }}-security main restricted universe multiverse
|
|
|
|
actions:
|
|
- trigger: post-unpack
|
|
action: |-
|
|
#!/bin/sh
|
|
echo 'Acquire::http::Proxy "http://192.168.2.83:80";' > /etc/apt/apt.conf.d/01prox
|
|
echo '#Acquire::http::Proxy "http://192.168.200.60:80";' >> /etc/apt/apt.conf.d/01prox
|
|
|
|
- trigger: post-packages
|
|
action: |-
|
|
#!/bin/sh
|
|
set -eux
|
|
|
|
# Enable systemd-networkd
|
|
systemctl enable systemd-networkd
|
|
|
|
- trigger: post-packages
|
|
action: |-
|
|
#!/bin/sh
|
|
set -eux
|
|
|
|
# Make sure the locale is built and functional
|
|
locale-gen en_US.UTF-8
|
|
update-locale LANG=en_US.UTF-8
|
|
|
|
# Cleanup underlying /run
|
|
mount -o bind / /mnt
|
|
rm -rf /mnt/run/*
|
|
umount /mnt
|
|
|
|
# Cleanup temporary shadow paths
|
|
rm /etc/*-
|
|
|
|
mappings:
|
|
architecture_map: debian
|