Docker learning notes - 01

·

1 min read

1. Check Docker version:

docker --version

2. Run Container

docker run -it alpine

3. Check who am I

whoami

root

4. Check where am I

pwd

\

5. List and Navigate

ls

cd

cd .. && ls

6. Files and Directories

mkdir touch mv echo cat rm more less head tail

7. Exiting and Cleanup

Containers

docker ps

docker container ls -a

docker container prune

Images

docker image ls -a

docker image prune

8. Install vim in Alpine

apk update

apk add vim

9. Save and exit in vim

:w save

:q exit

:q! exit and throw unsaved change.