Coder Social home page Coder Social logo

habibun / docker Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 14.18 MB

Docker resources for learning and practicing.

License: MIT License

Dockerfile 7.36% PHP 2.58% JavaScript 59.93% CSS 26.43% HTML 2.85% Shell 0.84%
docker docker-compose docker-image php

docker's Introduction

About The Project

Docker resources for learning and practicing.

CLI Reference

Docker

Docker CLI reference

# List running containers
docker ps
# List all containers
docker ps -a
# Start stopped containers
docker start container_id/container_name
# Stop one or more running containers
docker stop container_id/container_name
# Attach local standard input, output, and error streams to a running container
docker attach container_id/container_name
# Remove one or more containers
docker rm container_id/container_name
# Fetch the logs of a container
docker logs container_id/container_name
# Return low-level information on Docker objects
docker inspect container_id/container_name
# Restart one or more containers
docker restart container_name/container_id
# Remove unused data
docker system prune 
# Log in to a Docker registry
docker login
# Tag an image
docker tag mycurl username/repository_name:version
# Upload an image to a registry
docker push username/repository_name:version

Docker Container

Docker Container CLI reference

# List containers
docker container ls 
# Remove all stopped containers
docker container prune
# Stop one or more running containers
docker container stop CONTAINER

Docker Image

Docker Image CLI reference

# List images
docker image ls
# Display detailed information on one or more images
docker image inspect repository_name:tag/image_id
# Show the history of an image
docker image history repository_name:tag/image_id
# Pull an image or a repository from a registry
docker image pull repository_name:tag/image_id
# Remove one or more images
docker image rm repository_name:tag/image_id 
# Remove unused images
docker image prune

Docker Compose

docker-compose CLI reference

# Check version
docker compose version
# Logs from each of the services interleaved into a single stream
docker compose logs -f
# Logs from specific services
docker compose logs -f app
# Build or rebuild services
docker compose build
# Create and start containers
docker compose up

# Options
docker compose up -d
docker compose up --build
docker compose up container_name/container_id
# Stop services
docker compose stop
# Removes stopped service containers
docker compose rm
# Stop and remove containers, networks
docker compose down

Docker Volume

Docker Volume CLI reference

# List volumes
docker volume ls
# Remove one or more volumes
docker volume rm volume_name
# Create a volume
docker volume create --name volume_name

Docker network

Docker network CLI reference

# List networks
docker network ls
# Remove all unused networks
docker network prune
# Display detailed information on one or more networks
docker inspect container_name/container_id
# Create a network
docker network create network_name

Learn More

License

Distributed under the MIT License. See LICENSE for more information.

docker's People

Contributors

dependabot[bot] avatar habibun avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.