mirror of
https://github.com/davidallendj/configurator.git
synced 2025-12-20 03:27:02 -07:00
Added Dockerfile and Makefile rule
This commit is contained in:
parent
bc6eac3544
commit
699ff76e42
2 changed files with 28 additions and 9 deletions
14
Dockerfile
Normal file
14
Dockerfile
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
FROM cgr.dev/chainguard/wolfi-base
|
||||||
|
|
||||||
|
RUN apk add --no-cache tini bash
|
||||||
|
|
||||||
|
# nobody 65534:65534
|
||||||
|
USER 65534:65534
|
||||||
|
|
||||||
|
# copy the binary and all of the default plugins
|
||||||
|
COPY configurator /configurator
|
||||||
|
COPY lib/* /lib/*
|
||||||
|
|
||||||
|
CMD ["/configurator"]
|
||||||
|
|
||||||
|
ENTRYPOINT [ "/sbin/tini", "--" ]
|
||||||
23
Makefile
23
Makefile
|
|
@ -5,21 +5,26 @@ all: plugins exe test
|
||||||
# build the main executable to make configs
|
# build the main executable to make configs
|
||||||
main: exe
|
main: exe
|
||||||
driver: exe
|
driver: exe
|
||||||
|
binaries: exe
|
||||||
exe:
|
exe:
|
||||||
go build --tags=all -o configurator
|
go build --tags=all -o configurator
|
||||||
|
|
||||||
|
|
||||||
|
docker: binaries plugins
|
||||||
|
docker build -t configurator:latest .
|
||||||
|
|
||||||
# build all of the generators into plugins
|
# build all of the generators into plugins
|
||||||
plugins:
|
plugins:
|
||||||
mkdir -p lib
|
mkdir -p lib
|
||||||
go build -buildmode=plugin -o lib/conman.so internal/generator/plugins/conman/conman.go
|
go build -buildmode=plugin -o lib/conman.so pkg/generator/plugins/conman/conman.go
|
||||||
go build -buildmode=plugin -o lib/coredhcp.so internal/generator/plugins/coredhcp/coredhcp.go
|
go build -buildmode=plugin -o lib/coredhcp.so pkg/generator/plugins/coredhcp/coredhcp.go
|
||||||
go build -buildmode=plugin -o lib/dhcpd.so internal/generator/plugins/dhcpd/dhcpd.go
|
go build -buildmode=plugin -o lib/dhcpd.so pkg/generator/plugins/dhcpd/dhcpd.go
|
||||||
go build -buildmode=plugin -o lib/dnsmasq.so internal/generator/plugins/dnsmasq/dnsmasq.go
|
go build -buildmode=plugin -o lib/dnsmasq.so pkg/generator/plugins/dnsmasq/dnsmasq.go
|
||||||
go build -buildmode=plugin -o lib/example.so internal/generator/plugins/example/example.go
|
go build -buildmode=plugin -o lib/example.so pkg/generator/plugins/example/example.go
|
||||||
go build -buildmode=plugin -o lib/hostfile.so internal/generator/plugins/hostfile/hostfile.go
|
go build -buildmode=plugin -o lib/hostfile.so pkg/generator/plugins/hostfile/hostfile.go
|
||||||
go build -buildmode=plugin -o lib/powerman.so internal/generator/plugins/powerman/powerman.go
|
go build -buildmode=plugin -o lib/powerman.so pkg/generator/plugins/powerman/powerman.go
|
||||||
go build -buildmode=plugin -o lib/syslog.so internal/generator/plugins/syslog/syslog.go
|
go build -buildmode=plugin -o lib/syslog.so pkg/generator/plugins/syslog/syslog.go
|
||||||
go build -buildmode=plugin -o lib/warewulf.so internal/generator/plugins/warewulf/warewulf.go
|
go build -buildmode=plugin -o lib/warewulf.so pkg/generator/plugins/warewulf/warewulf.go
|
||||||
|
|
||||||
# remove executable and all built plugins
|
# remove executable and all built plugins
|
||||||
clean:
|
clean:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue