FROM alpine:latest

RUN apk add --no-cache bash curl

RUN adduser -D scripter
WORKDIR /home/scripter
USER scripter

RUN mkdir -p /home/scripter/scripts
COPY --chown=scripter:scripter ./scripts /home/scripter/scripts

CMD ["bash", "-c", "for script in /home/scripter/scripts/*.sh; do bash $script; done"]
