Sign inSign up

sujayadkesar/sysadmin

By sujayadkesar

•Updated over 3 years ago

Lets Exploit CTF

Image
0

314

sujayadkesar/sysadmin repository overview

⁠Docker Commands and Basic Usage

🐳 Docker is an open-source platform that allows you to automate the deployment and management of applications within lightweight, portable containers. Here are some essential Docker commands and basic instructions to help you get started!

⁠Installation

šŸ”§ To install Docker, follow these steps:

  1. Visit the Docker website⁠ and download the appropriate version for your operating system.
  2. Run the installer and follow the on-screen instructions.
  3. Once the installation is complete, verify the installation by opening a terminal or command prompt and running the command: docker --version.

⁠Docker Commands

šŸš€ Here are some commonly used Docker commands:

⁠Working with Containers
  • docker run <image>: Create and start a new container from an image.
  • docker start <container>: Start a stopped container.
  • docker stop <container>: Stop a running container.
  • docker restart <container>: Restart a running container.
  • docker rm <container>: Remove a stopped container.
  • docker ps: List running containers.
  • docker ps -a: List all containers (including stopped ones).
⁠Working with Images
  • docker pull <image>: Download an image from a registry.
  • docker build -t <tag> <path>: Build a new image from a Dockerfile.
  • docker push <image>: Push an image to a registry.
  • docker images: List all downloaded images.
  • docker rmi <image>: Remove an image.
⁠Managing Docker
  • docker version: Show Docker version information.
  • docker info: Display Docker system-wide information.
  • docker logs <container>: View the logs of a container.
  • docker exec -it <container> <command>: Execute a command inside a running container.
⁠Compose Commands
  • docker-compose up: Start services defined in a Compose file.
  • docker-compose down: Stop and remove services defined in a Compose file.
  • docker-compose build: Build or rebuild services defined in a Compose file.
  • docker-compose logs <service>: View the logs of a service in a Compose file.

⁠Basic Docker Workflow

šŸ”„ Here's a basic workflow to help you use Docker effectively:

  1. Pull an image: Download an existing image from a registry or build your own using a Dockerfile.
  2. Create a container: Start a new container from the image and configure any necessary settings or environment variables.
  3. Run your application: Execute your application within the container and test its functionality.
  4. Manage containers: Start, stop, restart, or remove containers as needed.
  5. Manage images: Pull new versions of images, build new images, or remove unnecessary images.
  6. Utilize Docker Compose: Use Docker Compose to define and manage multi-container applications.

šŸ“š For more detailed instructions and advanced usage, refer to the official Docker documentation⁠.

Happy Dockerizing! šŸ‹āœØ

Tag summary

Content type

Image

Digest

sha256:cd592a712…

Size

76.6 MB

Last updated

over 3 years ago

docker pull sujayadkesar/sysadmin