Line 22: Line 22:
Find the id for your specific container:
Find the id for your specific container:


<pre>
<quote>
[bpopp@p1 pubs]$ sudo docker ps
[bpopp@p1 pubs]$ sudo docker ps
CONTAINER ID        IMAGE                        COMMAND                  CREATED            STATUS              PORTS                    NAMES
CONTAINER ID        IMAGE                        COMMAND                  CREATED            STATUS              PORTS                    NAMES
'''e0fd0ef0e5c0'''        jupyter/all-spark-notebook  "tini -g -- jupyter …"  22 hours ago        Up 22 hours        0.0.0.0:8888->8888/tcp  kind_sanderson
'''e0fd0ef0e5c0'''        jupyter/all-spark-notebook  "tini -g -- jupyter …"  22 hours ago        Up 22 hours        0.0.0.0:8888->8888/tcp  kind_sanderson


</pre>
</quote>


<pre>sudo docker exec -it e0fd0ef0e5c0 /bin/bash</pre>
<pre>sudo docker exec -it e0fd0ef0e5c0 /bin/bash</pre>

Revision as of 13:53, 31 October 2019

Run

Not ideal because it resets whenever you start the container. Need a better way:

 sudo docker run -it -p 8888:8888 jupyter/pyspark-notebook jupyter notebook --no-browser --allow-root --ip=0.0.0.0

Then access it from a browser:

http://docker1.bpopp.net:8888

You'll need the token from the docker terminal the first time accessing the notebook.

Get Shell to Container

Get a list of running containers

sudo docker ps

Find the id for your specific container:

<quote> [bpopp@p1 pubs]$ sudo docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES e0fd0ef0e5c0 jupyter/all-spark-notebook "tini -g -- jupyter …" 22 hours ago Up 22 hours 0.0.0.0:8888->8888/tcp kind_sanderson

</quote>

sudo docker exec -it e0fd0ef0e5c0 /bin/bash