feat: updated dockerfile and added compose

This commit is contained in:
David Allen 2025-09-08 11:07:53 -06:00
parent a08f9ce5a0
commit 7713c2e55d
Signed by: towk
GPG key ID: 0430CDBE22619155
2 changed files with 37 additions and 9 deletions

View file

@ -1,14 +1,27 @@
FROM cgr.dev/chainguard/wolfi-base FROM alpine:latest AS builder
RUN apk add --no-cache tini bash RUN apk add go git gcc binutils bash
RUN mkdir -p /configurator
# nobody 65534:65534 WORKDIR /tmp
USER 65534:65534 RUN git clone https://git.towk2.me/towk/makeshift.git
# copy the binary and all of the default plugins WORKDIR /tmp/makeshift
COPY configurator /configurator/configurator
CMD ["/configurator/configurator"] RUN go mod tidy && \
go build && \
mkdir tmp && \
./makeshift plugins compile ./pkg/plugins/jinja2/jinja2.go -o ./tmp/plugins/jinja.so
ENTRYPOINT [ "/sbin/tini", "--" ]
FROM alpine:latest
COPY --from=builder /tmp/makeshift/makeshift /usr/local/bin
COPY --from=builder /tmp/makeshift/tmp/plugins/* /makeshift/server/plugins/
RUN chmod +x /usr/local/bin/makeshift
RUN mkdir -p /makeshift/logs && \
touch /makeshift/logs/makeshift.log
ENTRYPOINT ["/usr/local/bin/makeshift"]

15
docker-compose.yaml Normal file
View file

@ -0,0 +1,15 @@
services:
makeshift:
# build: ./Dockerfile
image: makeshift:latest
container_name: makeshift
network:
- internal
volumes:
- /tmp/makeshift/makeshift:/usr/local/bin
- /tmp/makeshift/plugins/*:/makeshift/server/plugins
ports:
- 5050:5050
networks:
internal: