This commit is contained in:
Disassembler 2018-09-04 22:13:08 +02:00
parent 1c40252112
commit b6ac14880b
Signed by: Disassembler
GPG Key ID: 524BD33A0EE29499
3 changed files with 9 additions and 8 deletions

View File

@ -4,9 +4,10 @@ set -e
SOURCE_DIR=$(realpath $(dirname "${0}"))/basic-runtimes
# Build basic Alpine image
mkdir -p /var/lib/lxc/shared/alpine
wget https://github.com/gliderlabs/docker-alpine/raw/2bfe6510ee31d86cfeb2f37587f4cf866f28ffbc/versions/library-3.8/x86_64/rootfs.tar.xz -O - | tar xJf - -C /var/lib/lxc/shared/alpine
cp ${SOURCE_DIR}/var/lib/lxc/shared/config /var/lib/lxc/shared/config
mkdir -p /var/lib/lxc/build/alpine
wget https://github.com/gliderlabs/docker-alpine/raw/2bfe6510ee31d86cfeb2f37587f4cf866f28ffbc/versions/library-3.8/x86_64/rootfs.tar.xz -O - | tar xJf - -C /var/lib/lxc/build/rootfs
cp ${SOURCE_DIR}/var/lib/lxc/build/config /var/lib/lxc/build/config
lxc-execute -n build -- /bin/sh -c 'apk --no-cache add s6'
# Build Docker images
docker build -t java ${SOURCE_DIR}/java

View File

@ -1,5 +1,5 @@
# Hostname
lxc.uts.name = shared
lxc.uts.name = build
# Network
lxc.net.0.type = veth
@ -9,11 +9,11 @@ lxc.net.0.ipv4.address = 172.17.0.2/16
lxc.net.0.ipv4.gateway = auto
# Volumes
lxc.rootfs.path = /var/lib/lxc/shared/alpine
lxc.rootfs.path = /var/lib/lxc/build/rootfs
# Mounts
lxc.mount.entry = /etc/hosts /etc/hosts none bind 0 0
lxc.mount.entry = /etc/resolv.conf /etc/resolv.conf none bind 0 0
lxc.mount.entry = /etc/hosts etc/hosts none bind 0 0
lxc.mount.entry = /etc/resolv.conf etc/resolv.conf none bind 0 0
# Halt
lxc.signal.halt = SIGTERM

View File

@ -60,7 +60,7 @@ vmmgr create-selfsigned
cp ${SOURCE_DIR}/etc/nginx/nginx.conf /etc/nginx/nginx.conf
# Configure services
for SERVICE in consolefont crond nginx ntpd lxd sshd swap vmmgr; do
for SERVICE in consolefont crond nginx ntpd lxc sshd swap vmmgr; do
rc-update add ${SERVICE} boot
service ${SERVICE} start
done