mirror of
https://github.com/outbackdingo/matchbox.git
synced 2026-01-27 10:19:35 +00:00
docker: Adopt alpine and mount volumes with SELinux ctx
This commit is contained in:
@@ -18,7 +18,7 @@ or build the binary from source.
|
||||
./build
|
||||
./docker-build
|
||||
|
||||
Next, prepare a [data config directory](#configs) or use the example in [data](data). Optionally create an [image assets](#assets) directory.
|
||||
Next, prepare a [data config directory](#configs) or use the example in [data](data). Optionally create an [image assets](#image assets) directory.
|
||||
|
||||
Run the application on your host or as a Docker container with flag or environment variable [arguments](docs/config.md).
|
||||
|
||||
@@ -40,15 +40,15 @@ Prepare a config data directory. If you keep a versioned repository of declarati
|
||||
└── uuid
|
||||
└── 1cff2cd8-f00a-42c8-9426-f55e6a1847f6
|
||||
└── mac
|
||||
└── 1cff2cd8-f00a-42c8-9426-f55e6a1847f6
|
||||
└── 52:54:00:c7:b6:64
|
||||
|
||||
To find boot configs and cloud configs, the `FileStore` searches the `uuid` directory for a file matching a client machine's UUID, then searches `mac` for file matching the client's MAC address, and finally falls back to using the `default` file if present.
|
||||
|
||||
A typical boot config can be written as
|
||||
|
||||
{
|
||||
"kernel": "/images/stable/coreos_production_pxe.vmlinuz",
|
||||
"initrd": ["/images/stable/coreos_production_pxe_image.cpio.gz"],
|
||||
"kernel": "/images/coreos/835.9.0/coreos_production_pxe.vmlinuz",
|
||||
"initrd": ["/images/coreos/835.9.0/coreos_production_pxe_image.cpio.gz"],
|
||||
"cmdline": {
|
||||
"cloud-config-url": "http://172.17.0.2:8080/cloud?uuid=${uuid}",
|
||||
"coreos.autologin": ""
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
docker run -p 8080:8080 --name=bootcfg --rm -v $PWD/data:/data -v $PWD/images:/images dghubble/bootcfg:latest -address=0.0.0.0:8080
|
||||
docker run -p 8080:8080 --name=bootcfg --rm -v $PWD/data:/data:Z -v $PWD/images:/images:Z dghubble/bootcfg:latest -address=0.0.0.0:8080
|
||||
@@ -1,6 +1,6 @@
|
||||
FROM fedora:latest
|
||||
FROM alpine:latest
|
||||
MAINTAINER Dalton Hubble <dalton.hubble@coreos.com>
|
||||
RUN dnf install -yq dnsmasq
|
||||
RUN apk -U add dnsmasq curl
|
||||
COPY dnsmasq.conf /etc/dnsmasq.conf
|
||||
RUN mkdir -p /var/lib/tftpboot
|
||||
RUN curl -s -o /var/lib/tftpboot/undionly.kpxe http://boot.ipxe.org/undionly.kpxe
|
||||
|
||||
@@ -15,4 +15,3 @@ dhcp-boot=tag:ipxe,http://172.17.0.2:8080/boot.ipxe
|
||||
|
||||
log-queries
|
||||
log-dhcp
|
||||
conf-dir=/etc/dnsmasq.d,.rpmnew,.rpmsave,.rpmorig
|
||||
Reference in New Issue
Block a user