From 7713c2e55d6296f3f0553b29c0fdb209fa9ea6cf Mon Sep 17 00:00:00 2001 From: David Allen Date: Mon, 8 Sep 2025 11:07:53 -0600 Subject: [PATCH] feat: updated dockerfile and added compose --- Dockerfile | 31 ++++++++++++++++++++++--------- docker-compose.yaml | 15 +++++++++++++++ 2 files changed, 37 insertions(+), 9 deletions(-) create mode 100644 docker-compose.yaml diff --git a/Dockerfile b/Dockerfile index 3a1e3a4..09456c3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,27 @@ -FROM cgr.dev/chainguard/wolfi-base +FROM alpine:latest AS builder -RUN apk add --no-cache tini bash -RUN mkdir -p /configurator +RUN apk add go git gcc binutils bash -# nobody 65534:65534 -USER 65534:65534 +WORKDIR /tmp +RUN git clone https://git.towk2.me/towk/makeshift.git -# copy the binary and all of the default plugins -COPY configurator /configurator/configurator +WORKDIR /tmp/makeshift -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", "--" ] \ No newline at end of file + +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"] \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..942fa01 --- /dev/null +++ b/docker-compose.yaml @@ -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: