docker: Adopt alpine and mount volumes with SELinux ctx

This commit is contained in:
Dalton Hubble
2015-12-16 10:48:05 -08:00
parent bef07bdfc9
commit b7316f7931
4 changed files with 7 additions and 8 deletions

View File

@@ -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": ""

View File

@@ -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

View File

@@ -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

View File

@@ -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