Skip to content

Commit

Permalink
Updated shellcheck + added version output for all packages.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexSkrypnyk authored Feb 14, 2019
1 parent 1a0627d commit 7669b6f
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 6 deletions.
39 changes: 33 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,72 @@ LABEL Maintainer="Alex Skrypnyk <[email protected]>"

# 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
6 changes: 6 additions & 0 deletions goss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7669b6f

Please sign in to comment.