CI / build-and-scan (push) Successful in 1m10s
Co-authored-by: Djeex <[email protected]>
27 lines
688 B
Docker
27 lines
688 B
Docker
FROM alpine:3.24.4@sha256:f59abe656b692d901e184be3445e084786602108599d2a51d229c0f5a48c71bf AS base
|
|
|
|
RUN apk add --no-cache socat netcat-openbsd su-exec \
|
|
&& rm -rf /var/cache/apk/* /tmp/*
|
|
|
|
COPY entrypoint.sh VERSION /
|
|
RUN mkdir -p /socket \
|
|
&& chmod +x /entrypoint.sh
|
|
|
|
FROM base AS test
|
|
|
|
RUN apk add --no-cache bats bash procps
|
|
|
|
WORKDIR /app
|
|
COPY entrypoint.sh VERSION /app/
|
|
COPY tests/ /app/tests/
|
|
|
|
FROM base AS lint
|
|
|
|
RUN apk add --no-cache shellcheck
|
|
RUN shellcheck --severity=error -s sh /entrypoint.sh
|
|
|
|
# Kept as the last stage so `docker build .` (no --target) still produces
|
|
# the lean prod image, not the `test`/`lint` stages above.
|
|
FROM base
|
|
ENTRYPOINT ["/entrypoint.sh"]
|