Rootless DOCKER

Rootless Docker (Basic)

You can manage Docker containers without needing sudo

systemctl --user: This command manages systemd user services. Rootless Docker often uses systemd for managing its services within your user session.

Start:

systemctl --user start docker.socket
systemctl --user start docker.service

Verify Docker is Running: docker info

docker ps --Lists currently running Docker containers.
docker ps -a --Lists all Docker containers (running and stopped).
docker images --Lists downloaded Docker images.
docker pull image_name --Downloads a Docker image from a registry (like Docker Hub).
docker run image_name --Creates and starts a Docker container from an image. You'll often need to specify ports and volumes.
docker run -d --name my_container -p 8080:80 nginx --Runs an Nginx container in the background (-d), names it my_container, and maps port 8080 on the host to port 80 in the container.
docker stop container_id_or_name --Stops a running Docker container.
docker start container_id_or_name --Starts a stopped Docker container.
docker restart container_id_or_name --Restarts a Docker container.
docker rm container_id_or_name --Removes a stopped Docker container.
docker rmi image_name --Removes a Docker image. Use with caution!

Set Environment Variables (If Necessary)

echo $DOCKER_HOST

If it's not set or you encounter issues, you might need to set it manually. Consult the rootless Docker documentation or the output of your installation.

 

  • DOCKER, rootless, images, VPS, container, ps
  • 0 Kunder som kunne bruge dette svar
Hjalp dette svar dig?

Relaterede artikler

How to connect via SSH

Connecting to Your Server (SSH) The first step is to connect to your server using SSH (Secure...

Linux basic commands for navigation

Basic Navigation pwd --Print Working Directory. Shows you the current directory you are in....

File Management

File Management (As User) Using SSH mkdir new_directory     --Make Directory. Creates a new...

Managinfg Your Seedbox (Deluge, rsync etc.)

Typically, you won't directly interact with Deluge or ruTorrent via the command line for...

Managing Your VPS

These commands are more relevant when you have a VPS, giving you more control over the system....