Permission Denied When Using Docker Command to Retrieve Jupyter Token for Pyspark Demo

  docker, jupyter-notebook, linux, linux-mint, pyspark

So I am trying to do this demo that has the steps laid out on this github page:

https://github.com/garystafford/pyspark-setup-demo

There’s also an article that goes along with it that goes into detail on each of the steps on the github page:

https://programmaticponderings.com/2019/12/06/getting-started-with-data-analytics-using-jupyter-notebooks-pyspark-and-docker/

So I am on step 6 of the setup where I’m supposed to retrieve the token to log into Jupyter using
docker logs $(docker ps | grep jupyter_spark | awk '{print $NF}') but I keep running into an error. (I am using sudo before docker)

steps 5 and 6

Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/json: dial unix /var/run/docker.sock: connect: permission denied "docker logs" requires exactly 1 argument.
See 'docker logs --help'.

Usage: docker logs [OPTIONS] CONTAINER```

Source: Docker Questions

LEAVE A COMMENT