FROM registry.fedoraproject.org/fedora:latest

# Install generic dependencies to check style
RUN true \
        && dnf update -y --refresh \
        && dnf install -y perl ShellCheck python2-pylint python3-pylint \
        && mkdir -p /home/sandbox \
        && dnf clean -y all \
        && rm -rf /usr/share/doc /usr/share/doc-base \
                  /usr/share/man /usr/share/locale /usr/share/zoneinfo \
        && true

# Link in the current version of jss from the git repository
WORKDIR /home/sandbox
COPY . /home/sandbox/jss

# Perform the style checks
WORKDIR /home/sandbox/jss
CMD true \
        && bash ./tools/test_shell_style.sh \
        && true
