Shellcheck version

What version of shellcheck are we using ? As far as I can tell we may be using 0.8.0 from the dockerfile for ubuntu 22.04.

(Version 0.9.0 of shellcheck is available as of 2022-12.)

Thanks !

Thanks for checking. Do you feeling like taking this on?

Happy to help, but be forewarned I have zero docker experience !
:flushed:

First guess is that this may be a single line change to the interim release of Ubuntu 22.10 (which hopefully includes the latest shellcheck).

bash-analyzer/blob/main/Dockerfile

-FROM ubuntu:22.04
+FROM ubuntu:22.10

Am I on the right path?

Kind of, but we can’t rely on ā€œhopefullyā€, we have to go check:
searching Ubuntu packages for shellcheck, we can see that 22.10 still uses v0.8.0

The right approach to take would be to download the latest stable release tarball from shellcheck’s github (https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz), untar it, and install the binary into a directory in the PATH.

Okay — I have shellcheck 0.9.0 installed. I’m using nix as a package manager and I’m on macOS:

$ which shellcheck
/XXX/.nix-profile/bin/shellcheck

$ shellcheck --version
ShellCheck - shell script analysis tool
version: 0.9.0

So I take it I don’t need the binary tarball ?

I mean those steps need to happen in the Dockerfile

Changing

RUN apt-get update && \
    apt-get install -y bats ruby shellcheck jq && \
    apt-get purge --auto-remove && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

so that shellcheck is not installed through APT but from the tarball.

Righto, so it looks like I need Docker Desktop installed otherwise we have issues like:

$ docker run hello-world
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.

The install requirements for Docker Desktop list a minimum of macOS 11 while I’m on an un-upgradable 10.

Is this a dead end or am I reading this wrong ?

Thanks, @glennj
:crazy_face:

I believe that the docker CLI can be installed with Homebrew: Docker Desktop is not required.

I have docker installed, but that appears insufficient on macOS according to Kevin Burke’s stackoverflow comment.

Following those instructions, I also installed docker-machine and virtualbox to enable containerization. Home brew installed virtualbox even though it cannot run on my un-upgradeable system:

vb-min

Now I’m thinking that this was all futile as my CPU is too old and doesn’t support virtualization anyway.

Following the official docker instructions, I got as far as:

$ docker-machine create default
Running pre-create checks...
Error with pre-create check: "signal: abort trap"

So I think I may have to pass on this opportunity !
:frowning:

1 Like