makeshift/Dockerfile

29 lines
684 B
Docker

FROM archlinux:latest AS builder
RUN pacman -Sy
RUN pacman -S go git gcc binutils bash --noconfirm
WORKDIR /tmp
RUN git clone https://git.towk2.me/towk/makeshift.git
WORKDIR /tmp/makeshift
RUN go mod tidy && \
go build && \
mkdir -p /makeshift
RUN ./makeshift init /makeshift
RUN ./makeshift plugins compile ./pkg/plugins/jinja2/jinja2.go -o ./tmp/plugins/jinja.so
FROM alpine:latest
COPY --from=builder /tmp/makeshift/makeshift /usr/local/bin
COPY --from=builder /tmp/makeshift/tmp/plugins/* /makeshift/plugins/
RUN chmod +x /usr/local/bin/makeshift
RUN mkdir -p /makeshift/logs && \
touch /makeshift/logs/makeshift.log
ENTRYPOINT ["/usr/local/bin/makeshift"]