mirror of
https://github.com/dredx/prole.git
synced 2026-09-23 11:03:59 +00:00
- Introduce lib/shell helpers and keep etc/* scripts thin via compatibility shims - Move Kerberos validation to scripts/validation/check_kerberos.sh and update callers - Add deterministic shellspec unit tests under tests/shellspec/ and wire Maven to run them - Add minimal Spring Boot authority module with startup + /health endpoint and Maven wiring - Document the new layout in docs/layout.md Co-authored-by: Junie <junie@jetbrains.com>
62 lines
2.3 KiB
Docker
62 lines
2.3 KiB
Docker
ARG TYPE="general"
|
|
|
|
FROM alpine as general_installer
|
|
RUN apk --no-cache add git curl
|
|
RUN echo 'cd $(dirname $(which _$1)); mv _$1 $1' > /usr/local/bin/enable \
|
|
&& echo 'cd $(dirname $(which $1)); mv $1 _$1' > /usr/local/bin/disable \
|
|
&& chmod +x /usr/local/bin/*
|
|
RUN echo '#!/bin/sh' > /entrypoint.sh \
|
|
&& echo 'echo You can use enable/disable [COMMAND]' >> /entrypoint.sh \
|
|
&& echo 'exec "$@"' >> /entrypoint.sh \
|
|
&& chmod +x /entrypoint.sh
|
|
ENV PATH $PATH:/root/bin
|
|
WORKDIR /root
|
|
ENTRYPOINT [ "/entrypoint.sh" ]
|
|
CMD [ "/bin/sh" ]
|
|
|
|
FROM alpine as make_installer
|
|
RUN apk --no-cache add make
|
|
WORKDIR /root/shellspec
|
|
|
|
FROM alpine as bpkg_installer
|
|
RUN apk --no-cache add bash git curl make coreutils
|
|
RUN curl -sLo- http://get.bpkg.sh | PREFIX=/usr/local bash
|
|
RUN echo '#!/bin/sh' > /entrypoint.sh \
|
|
&& echo 'echo Usage: bpkg install shellspec/shellspec' >> /entrypoint.sh \
|
|
&& echo 'echo Usage: bpkg install shellspec/shellspec@0.19.0' >> /entrypoint.sh \
|
|
&& echo 'echo Usage: bpkg install shellspec/shellspec -g' >> /entrypoint.sh \
|
|
&& echo 'exec "$@"' >> /entrypoint.sh \
|
|
&& chmod +x /entrypoint.sh
|
|
ENTRYPOINT [ "/entrypoint.sh" ]
|
|
WORKDIR /root/project
|
|
CMD [ "/bin/bash", "-l" ]
|
|
|
|
FROM alpine as basher_installer
|
|
RUN apk --no-cache add bash git
|
|
RUN git clone https://github.com/basherpm/basher.git ~/.basher
|
|
RUN echo 'export PATH="$HOME/.basher/bin:$PATH"' >> ~/.bash_profile
|
|
RUN echo 'eval "$(basher init -)"' >> ~/.bash_profile
|
|
RUN echo '#!/bin/sh' > /entrypoint.sh \
|
|
&& echo 'echo Usage: basher install shellspec/shellspec' >> /entrypoint.sh \
|
|
&& echo 'echo Usage: basher install shellspec/shellspec@0.19.0' >> /entrypoint.sh \
|
|
&& echo 'echo Usage: basher link ./shellspec shellspec/shellspec' >> /entrypoint.sh \
|
|
&& echo 'exec "$@"' >> /entrypoint.sh \
|
|
&& chmod +x /entrypoint.sh
|
|
ENTRYPOINT [ "/entrypoint.sh" ]
|
|
WORKDIR /root
|
|
CMD [ "/bin/bash", "-l" ]
|
|
|
|
FROM linuxbrew/brew as brew_installer
|
|
RUN echo '#!/bin/sh' > /entrypoint.sh \
|
|
&& echo 'echo "Usage: brew tap shellspec/shellspec"' >> /entrypoint.sh \
|
|
&& echo 'echo " brew install shellspec"' >> /entrypoint.sh \
|
|
&& echo 'echo " brew test shellspec"' >> /entrypoint.sh \
|
|
&& echo 'exec "$@"' >> /entrypoint.sh \
|
|
&& chmod +x /entrypoint.sh
|
|
ENTRYPOINT [ "/entrypoint.sh" ]
|
|
CMD [ "/bin/bash", "-l" ]
|
|
|
|
FROM shellspec:${TYPE}_installer as test
|
|
COPY ./install.sh /root/
|
|
COPY ./ /root/shellspec
|