User Tools

Site Tools


public:docker

This is an old revision of the document!


Last-updated: 2025/02/22 liangz

Docker tutorial

Step 1: Understand docker

  • Read What is docker and understand (docker) image, container, daemon, client, hub (registry), pull, push.
  • Install docker (Linux as example. Information on other OSes are welcome too.)
    • $ sudo apt install docker.io
    • Add your username to the “docker” group (or by editing /etc/group directly).
      • $ sudo usermod -aG docker your_username
      • Logout & login to make the change of group into effect, or simply reboot your Linux.
  • Run a ubuntu container (docker client will automatically pull a ubuntu image and create a local container.). If you get a console with command prompt “root@xxxxxxxxxxxx:/,” it worked.
    • $ docker run -i -t ubuntu /bin/bash
  • Exit the container by exit (notice the prompt changed to “#”, showing you are the root)
    • # exit
public/docker.1740193299.txt.gz · Last modified: 2025/02/22 12:01 by liang