diff --git a/Dockerfile b/Dockerfile index 91aeabb..da1c332 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,8 +6,10 @@ ENV GROUP dockergroup ENV USER docker ENV HOMEDIR "/home/${USER}" ENV PATH ${HOMEDIR}/.local/bin:$PATH -ENV PROFILE production +ENV PLUGIN_PROFILE production RUN addgroup -S "${GROUP}" && adduser -S "${USER}" -G "${GROUP}" +COPY script.sh /bin/ +RUN chmod +x /bin/script.sh USER ${USER} WORKDIR ${HOMEDIR} COPY requirements.txt . @@ -15,4 +17,4 @@ RUN pip install --no-cache-dir -r requirements.txt RUN rm requirements.txt RUN git config --global --add safe.directory /drone/src -CMD [ "ansible-lint", "--profile $PROFILE" ] \ No newline at end of file +ENTRYPOINT [ "script.sh" ] \ No newline at end of file diff --git a/script.sh b/script.sh new file mode 100644 index 0000000..d5ae11d --- /dev/null +++ b/script.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +echo "Starting ansible linter by Aaron Riedel" +echo "" +cd /drone/src +ansible-lint --profile $PLUGIN_PROFILE \ No newline at end of file