docker pull alpine:latest
List images:
docker image ls
Or:
docker images
To remove an image:
docker image remove alpine:latest
To remove all images (without an associated container):
docker image prune --all
If the image is not already pulled, it will automatically be pulled, and so there is generally no need to manually pull images.
docker container create --name container_name alpine:latest
docker create --name container_name alpine:latest
If no name is provided, a random one will be created.
Once a container has been created, it can be started.
List containers. The "a" flag makes it show all containers, not just those running.
docker ps -a
docker container start container_name
docker start container_name
We can run it interactively and with a TTY.
docker container start --interactive --tty container_name
docker start -it container_name
Run can be used instead of create and start.
docker container run -it --name container_name alpine:latest
docker run -it --name container_name alphine:latest
Stopping containers.
sudo docker kill $(sudo docker ps -q)
Removing containers.
sudo docker rm $(sudo docker ps -a -q)
sudo docker system prune -af (this does much more than other stuff, saved lots of space. what does it do?)
First, build the images.
docker build -t "ae:tensorflow" -f ./docker/tf/Dockerfile_jetson.gpu .
Build
docker build -t localhost:32000/homepage-nodejs -f ./docker/web/Dockerfile .
docker run --detach
docker run -d
making things start on reboot
docker run -d --restart=always
docker exec -it <container_name> /bin/bash
docker run -d -p 5000:5000 --restart=always --name registry registry:2
docker tag ubuntu:16.04 localhost:5000/my-ubuntu
docker push localhost:5000/my-ubuntu
docker pull localhost:5000/my-ubuntu
docker image remove localhost:5000/my-ubuntu
sudo docker push localhost:32000/homepage-nodejs
docker container stop registry
docker container stop registry && docker container rm -v registry
sudo docker-compose build --no-cache
sudo docker-compose up --detach
can delete old databases if interacting badly
sudo rm -rf /data/db/artificialeconomist_mongo