Browse Source

Add sample LXC and docker configs

master
Dashie der otter 2 years ago
parent
commit
99ca7ad51c
Signed by: Dashie <dashie@sigpipe.me> GPG Key ID: C2D57B325840B755
4 changed files with 49 additions and 0 deletions
  1. 3
    0
      .dockerignore
  2. 18
    0
      Dockerfile
  3. 9
    0
      Makefile
  4. 19
    0
      lxc-config

+ 3
- 0
.dockerignore View File

@@ -0,0 +1,3 @@
.git
LICENSE
README.md

+ 18
- 0
Dockerfile View File

@@ -0,0 +1,18 @@
# vim:set ft=dockerfile:
FROM ubuntu:17.10
#FROM debian:stable

LABEL maintainer="Dashie <dashie@sigpipe.me>"

LABEL org.label-schema.license=MIT \
org.label-schema.name=lutrainit \
org.label-schema.vcs-url=https://dev.sigpipe.me/dashie/lutrainit

COPY lutractl/lutractl /usr/local/bin/
COPY lutrainit/lutrainit /usr/local/bin/
COPY conftest /etc/lutrainit

ENTRYPOINT ["/usr/local/bin/lutrainit"]

# No CMD, we are testing an init
#CMD ["asterisk", "-vvf", "-T", "-W", "-U", "asterisk", "-p"]

+ 9
- 0
Makefile View File

@@ -68,3 +68,12 @@ install-sample-conf:
install -m 0755 -p conf/lutra.d/network.eth0.service /etc/lutrainit/lutra.d/
install -m 0755 -p conf/lutra.d/udev.service /etc/lutrainit/lutra.d/
install -m 0755 -p conf/lutra.d/wpa_supplicant.service /etc/lutrainit/lutra.d/

docker-build: build
docker build -t dashie/lutrainit:latest .

docker-run: docker-build
docker run --entrypoint /usr/local/bin/lutrainit --name lutrainit dashie/lutrainit:latest

docker-rm:
docker rm lutrainit

+ 19
- 0
lxc-config View File

@@ -0,0 +1,19 @@
lxc.include = /usr/share/lxc/config/debian.common.conf
lxc.include = /var/lib/lxc/common.conf

lxc.cgroup.memory.limit_in_bytes = 256M
lxc.cgroup.memory.memsw.limit_in_bytes = 512M

lxc.network.ipv4 = 10.0.0.123/24
lxc.network.ipv4.gateway = 10.0.0.100

lxc.rootfs = /var/lib/lxc/j-dev-lutrainit/rootfs

# Container specific configuration
lxc.mount = /var/lib/lxc/j-dev-lutrainit/fstab
lxc.utsname = j-dev-lutrainit
lxc.arch = amd64
lxc.autodev = 1
lxc.kmsg = 0
lxc.tty = 8


Loading…
Cancel
Save