From 7669b6f3e60a77fb657c579728d660eb82727ea5 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Thu, 14 Feb 2019 12:48:45 +1100 Subject: [PATCH] Updated shellcheck + added version output for all packages. --- Dockerfile | 39 +++++++++++++++++++++++++++++++++------ goss.yaml | 6 ++++++ 2 files changed, 39 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index c6ff0db..af75b0d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,45 +3,72 @@ LABEL Maintainer="Alex Skrypnyk " # Install git and ssh. RUN apt-get update -qq \ - && apt-get install -y git ssh zip unzip vim lynx curl aspell-en jq shellcheck + && apt-get install -y git ssh zip unzip vim lynx curl aspell-en jq + +RUN git --version \ + && ssh -V \ + && zip --version \ + && unzip -v \ + && vim --version \ + && lynx --version \ + && curl --version \ + && aspell --version \ + && jq --version + +# Install shellcheck +ENV SHELLCHECK_VERSION=0.6.0 +RUN curl -L -o "/tmp/shellcheck-v$SHELLCHECK_VERSION.tar.xz" "https://storage.googleapis.com/shellcheck/shellcheck-v${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" \ + && tar --xz -xvf "/tmp/shellcheck-v${SHELLCHECK_VERSION}.tar.xz" \ + && mv "shellcheck-v${SHELLCHECK_VERSION}/shellcheck" /usr/bin/ \ + && shellcheck --version # Install docker && docker compose. RUN curl -L -o /tmp/docker-18.06.1-ce.tgz https://download.docker.com/linux/static/stable/x86_64/docker-18.06.1-ce.tgz \ && tar -xz -C /tmp -f /tmp/docker-18.06.1-ce.tgz \ && mv /tmp/docker/* /usr/bin \ + && docker --version \ && curl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose \ - && chmod +x /usr/local/bin/docker-compose + && chmod +x /usr/local/bin/docker-compose \ + && docker-compose --version # Install composer. ENV COMPOSER_ALLOW_SUPERUSER=1 RUN curl -L -o /usr/local/bin/composer https://getcomposer.org/download/1.6.3/composer.phar \ && echo "52cb7bbbaee720471e3b34c8ae6db53a38f0b759c06078a80080db739e4dcab6 /usr/local/bin/composer" | sha256sum \ && chmod +x /usr/local/bin/composer \ + && composer --version \ # Install composer plugin to speed up packages downloading. && composer global require hirak/prestissimo ENV PATH /root/.composer/vendor/bin:$PATH # Install NVM and NodeJS. -RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | bash ENV NVM_DIR=/root/.nvm +RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | bash \ + && . $HOME/.nvm/nvm.sh \ + && nvm --version + ENV SHIPPABLE_NODE_VERSION=v8.9.1 RUN . $HOME/.nvm/nvm.sh \ && nvm install $SHIPPABLE_NODE_VERSION \ && nvm alias default $SHIPPABLE_NODE_VERSION \ - && nvm use default + && nvm use default \ + && npm --version ENV PATH $NVM_DIR/versions/node/$SHIPPABLE_NODE_VERSION/bin:$PATH # Install Goss. ENV GOSS_FILES_STRATEGY=cp -RUN curl -fsSL https://goss.rocks/install | sh +RUN curl -fsSL https://goss.rocks/install | sh \ + && goss --version # Install Bats. RUN curl -L -o /tmp/bats.tar.gz https://github.com/bats-core/bats-core/archive/v1.1.0.tar.gz \ && mkdir -p /tmp/bats && tar -xz -C /tmp/bats -f /tmp/bats.tar.gz --strip 1 \ && cd /tmp/bats \ && ./install.sh /usr/local \ + && bats -v \ && rm -Rf /tmp/bats # Install Ahoy. RUN curl -L https://github.com/ahoy-cli/ahoy/releases/download/2.0.0/ahoy-bin-`uname -s`-amd64 -o /usr/local/bin/ahoy \ - && chmod +x /usr/local/bin/ahoy + && chmod +x /usr/local/bin/ahoy \ + && ahoy --version diff --git a/goss.yaml b/goss.yaml index f13a276..92a72b6 100644 --- a/goss.yaml +++ b/goss.yaml @@ -126,6 +126,12 @@ command: - /usr/bin/shellcheck stderr: [] timeout: 10000 + shellcheck --version: + exit-status: 0 + stdout: + - 0.6.0 + stderr: [] + timeout: 10000 which bats: exit-status: 0