FROM alpine:3.20

LABEL maintainer="Programmfabrik GmbH <support@programmfabrik.de>"

RUN apk update && \
    apk upgrade && \
    apk add curl python3 rsync make git && \
    apk add --update npm && \
    npm install -g coffeescript@1 sass && \
    mkdir -p /srv/easydb-plugins-code /srv/easydb-plugins-build-dir

ADD . /srv/easydb-plugins-code/

WORKDIR /srv/easydb-plugins-code

RUN make

RUN find . -name .git|xargs rm -rf
RUN find . -type l|xargs rm -rf

RUN mv /srv/easydb-plugins-code /srv/easydb-plugins

WORKDIR /srv/easydb-plugins
