-
Notifications
You must be signed in to change notification settings - Fork 2
Commands
Adrian Wilke edited this page Nov 16, 2018
·
13 revisions
sudo docker cp nbgjava:/opt/conda/etc/jupyter/nbgrader_config.py ./
sudo chown <USER> nbgrader_config.py
nano nbgrader_config.py
sudo docker cp ./nbgrader_config.py nbgjava:/opt/conda/etc/jupyter/nbgrader_config.py
sudo docker restart nbgjava
List docker elements
docker container ls -a
docker image ls -a
docker volume ls
Stop all containers
docker kill $(docker ps -q)
Remove / delete all docker elements (be careful!)
docker rm $(docker ps -a -q)
docker rmi -f $(docker images -a -q)
docker system prune -a
Source: https://www.digitalocean.com/community/tutorials/how-to-remove-docker-images-containers-and-volumes
- Get container names:
sudo docker container ls -a
- Get ID of container:
sudo docker inspect <CONTAINERNAME> | grep Id
- Stop container:
sudo docker stop <CONTAINERNAME>
- Stop docker:
systemctl stop docker
- Change port:
sudo nano /var/lib/docker/containers/<CONTAINERID>/hostconfig.json
- Start docker:
systemctl start docker
Sources:
- https://stackoverflow.com/questions/19335444/how-do-i-assign-a-port-mapping-to-an-existing-docker-container/38783433#38783433
- https://mybrainimage.wordpress.com/2017/02/05/docker-change-port-mapping-for-an-existing-container/
sudo docker stop nbgjava ; sudo docker rm nbgjava ; sudo rm -rf /mnt/nbgjava/
nbgrader db student import --db=sqlite:////home/nbgadmin/gradebook.db /full/path/to/file.csv
id,last_name,first_name
student2,Smith,Claudius
student1,Student1Last,Student1First
nbgrader export --db="sqlite:////tmp/gradebook.db" --to pggrades.csv