Useful Docker Tools

Useful Docker Tools

In this article, we have decided to round up the most useful docker monitoring tools. Below we have tried to define a rich list of these existing ..

The container ecosystem is growing and expanding faster than ever, and with so many Docker tools and services, it can feel like a daunting task just understanding the available options. Whether you're a beginner or expert, developer or DevOps engineer, SRE or platform architect, this list will be your companion guide to understanding the most popular offerings for enhancing every stage of your development pipeline with Docker.

Docker Tools Categories List
  • Orchestration and Schedulers
  • Continuous Integration/Continuous Deployment (CI/CD)
  • Monitoring
  • Logging
  • Security
  • Storage/Volume Management
  • Networking
  • Service Discovery
  • Builds
  • Management
Orchestration and Schedulers

1. Kubernetes

Kubernetes is the defacto, most popular container orchestration engine available on the market. Initially begun as a Google project, thousands of teams use it to deploy containers in production. Google claims it runs billions of containers using Kubernetes every week.

The tool works by grouping containers that make up an application into logical units for easy management and discovery.

Link: https://kubernetes.io

Cost: Free

2. Docker Swarm

Swarm is Docker's answer to a developer's problem of how to orchestrate and schedule containers across many servers. Swarm has been included in Docker Engine since version 1.12.0, and offers advanced features such as baked-in service discovery, load balancing, scaling, and security.

Swarm continues in Docker's tradition of focusing on simplicity and the developer experience. It is arguably easier to use than Kubernetes out of the box.

Link: https://www.docker.com

Cost: Free Community Edition

3. Mesosphere DC/OS

Mesosphere Datacenter Operating System (DC/OS) is an integrated open-source platform for data and containers built on the Apache Mesos distributed systems kernel. It is designed to treat multiple machines within a data center as one or more clusters either in the cloud or using on-premise software. DC/OS can deploy containers and manage both stateless applications and stateful workloads in the same environment.

Works with Docker Swarm and Kubernetes.

Link: https://dcos.io/

Cost: Mesosphere DC/OS subscription packages are based on the number of nodes (physical or virtual) in your environment.


4. Amazon ECS

Amazon Web Services' answer to container orchestration, Amazon ECS is a highly scalable management service which allows developers to run containerized applications on EC2 instances. It is composed of multiple built-in components to enable the simple scheduling and deployment of Docker clusters, tasks, and services.

While there is no support for running containers outside of EC2, the benefits include AWS service advantages such as CloudTrail, CloudWatch, Elastic Load Balancers, etc.

Link: https://aws.amazon.com/ecs/

Cost: Amazon ECS comes at no additional cost. Pay only for the AWS resources (e.g. EC2 instances or EBS volumes) necessary to store and run your application.

5. Azure Container Service (AKS)

Recently rebranded from ACS to AKS, Azure's service is an open-source management service optimized for use on Azure Virtual Machines. It provides the necessary tools to create, configure, and manage open Docker container infrastructure. AKS offers simplified container-based application development and deployment with support for Kubernetes, Mesospere DC/OS, or Swarm for orchestration.

Scale and orchestrate using application management tools of your choice and connect via standard API endpoints.

Link: https://azure.microsoft.com/en-us/services/container-service/

Cost: Pay only for the virtual machines, and associated storage and networking resources used.


6. Google Container Engine (GKE)

Powered by Kubernetes, GKE can deploy, manage and scale containerized applications on Google Cloud. GKE's aim is to optimize IT team productivity by improving the management of container-based workloads. It hides both complex and simple management tasks behind easy user experience and straightforward command line tools.

Kubernetes is the backbone of GKE. While you don't need to learn it to use GKE, it helps if you understand the basics.

Link: https://cloud.google.com/container-engine/

Cost: Free for 0-5 nodes, 6+ nodes = $0.15/hr ($109.50/mo) per cluste

7. Cloud Foundry's Diego

Cloud Foundry uses its Diego architecture to manage application containers within the 'garden' environment. Garden follows Linux's Open Container Initiative guidelines for hosting containers and is abstracted through Diego's other components. The Diego elements offer application scheduling and management capabilities through the Cloud Controller.

Link: https://docs.cloudfoundry.org/concepts/diego

Cost: Free

8. Marathon

Marathon is a private production-grade Platform-as-a-Service (PaaS) built on Apache Mesos. The Marathon framework promises to scale Dockerized applications and expand to more nodes when necessary to increase the available resource pool. It can also act as a container orchestration tool to provide fault recovery for containerized workloads. Marathon automatically handles hardware or software failures and ensures that an application is "always on."

Link: https://mesosphere.github.io/marathon/

Cost: Free

9. HashiCorp Nomad

Supported by Linux, Mac, and Windows, Nomad is a single binary tool capable of scheduling all virtualized, containerized, and standalone applications. From a single container to a swarm of thousands, Nomad allows you to run 1 million containers across 5,000 hosts in a matter of minutes. Nomad helps improve density, at the same time as reducing costs, by efficiently allocating more applications on fewer servers.

Link: https://www.nomadproject.io/

Cost: Free

10. Helios

Helios began as Spotify's internal tool for ensuring hundreds of microservices work effectively across several thousand servers. It is capable deploying and managing containers at scale and is equipped with an API based on HTTP as well as a command-line client.

Helios does not need a specific network topology; it merely requires a ZooKeeper cluster and a JVM on the machines which the tool will run on. It is available as an open-source project.

Link: https://github.com/spotify/helios

Cost: Free

11. Rancher

Not just a container orchestrator, but a complete container management platform for operating Docker in production. RancherOS is a container-based operating system (OS) that is capable of many infrastructure services such as global and local load balancing, multi-host networking, and volume snapshots. Rancher integrates native Docker management capabilities such as Docker Machine and Swarm.

Link:http://rancher.com/

Cost: Free

12. Nebula

Nebula is a new open source project created for Docker orchestration and designed to manage massive clusters at scale. The tool achieves this by scaling each project component out as far as required. The project's aim is to act as Docker orchestrator for IoT devices as well as for distributed services such as CDN or edge computing. Nebula is capable of simultaneously updating tens of thousands of IoT devices worldwide with a single API call. Nebula aims to help devs and ops treat IoT devices just like distributed Dockerized apps.

Link:http://nebula.readthedocs.io/en/latest/

Cost: Free

Continuous Integration/Continuous Deployment (CI/CD)13. Jenkins

Jenkins is a leading CI tool that enables dev and ops teams to automate build and test cycles for applications. As such, it has become a tool synonymous with the DevOps movement. A self-contained Java-based program, Jenkins works right out of the box and delivers hundreds of plugins designed to integrate with other tools across your stack. The tool enables you to quickly provision build agents, deploy artifacts, then tear-down quickly.

Cost: Free

14. CircleCI

CircleCI promises to help software teams focus on delivering value to customers rather than maintaining CI infrastructure. CircleCI improves IT team's productivity by making the CI process quicker and simpler. It integrates quickly and allows you to build and deploy immediately after signup. Debug manually via SSH and dynamically scale the number of containers at the same time when beginning a project.

Link:https://circleci.com/

Cost: First container is free; open source projects +3 free; additional containers $50/month (per container)

15. Travis CI

A free open-source CI project, Travis CI improves the efficiency of a development process by enabling the automatic building and testing of code changes. The Software-as-a-Service (Saas) platform is then capable of providing immediate feedback on the code change's success. Travis CI is also capable of automating other parts of your development process by managing deployments and notifications.

Link: https://travis-ci.org/

Cost: Free

16. CodeShip

CodeShip is a fully customizable CI platform which provides native support for Docker by working with your established Docker workflows. The platform is dedicated to speed and security and works by automating your testing and deployment tasks giving you complete control over your build environment. It offers support for many other cloud platforms and orchestration tools.

Link: https://codeship.com/

Cost:

  • Basic: Free for 100 builds/month, pricing starts at $49/month
  • Pro: Starts at $75/month

17. GitLab CI

GitLab combines CI, CD and code review to handle your entire application lifecycle. It works in conjunction with GitLab runner on Docker Engine to enable automated tests and builds of apps. Other features include activity streams, IDE, issue tracking, and repository management. GitLab CI also has a built-in container registry to scan and store Docker repositories.

Link: https://about.gitlab.com/features/gitlab-ci-cd/

Cost:

  • Community Edition: Free, unlimited users
  • Enterprise Edition Starter: $3.25/user/month
  • Enterprise Edition Premium: $16.59/user/month

18. Shippable

Speed up software delivery with Shippable; a SaaS platform for developers that dramatically reduces the time needed to build, test and deploy code to production. Shippable is designed to be a one-stop automation platform that enables the practice of DevOps and optimizes innovation by providing complete workflow visibility. The simple plug-and-play interface means Shippable integrates easily with many other application architectures and tech stacks.

Link: https://www.shippable.com/

Cost:

  • Free: c4.large node, unlimited builds, 1 concurrent job
  • $25/75/150/month: c4 large/xlarge/2xlarge nodes, each concurrent job
  • Enterprise Support Add-on: Starts at $500/month

19. CodeFresh

CodeFresh provides a complete toolchain with which devs can create and automate delivery pipelines. Built on Kubernetes, these Docker native CI/CD pipelines offer fast and efficient resource management with caching. CodeFresh combines an enterprise-ready registry with seamless connection and deployment to Kubernetes.

Link: https://codefresh.io/

Cost:

  • Free (public repos only)
  • Basic: Begins at $99/month (public & private repos)
  • Pro: $299/month, dedicated nodes with SSH
20. Buddy

Build, test, and deploy apps in no time. Buddy is a CI/CD and user feedback platform with a friendly user interface, fast integration, and tools to make continuous deployment more efficient and productive. It supports all popular languages and frameworks including Angular, Ruby, Python, PHP/Laravel, Node.js, and .NET Core.

Link: https://buddy.works/

Cost:

  • Freelancer: $49/month
  • Team: $99/month
  • Software House: $199/month
  • Mega: $299/month


21. Drone

An open-source CI and Deployment-as-a-service platform, Drone is built on container technology using Go and Docker. The platform requires no installation, configuration or server maintenance and it integrates seamlessly with BitBucket, Heroku, GitHub, and others to automate code building, testing, and deployment using Docker containers.

Link: https://drone.io/

Cost:

  • Nano: $125/month
  • Micro: $250/month
  • Mega: $500/month

22. Wercker

A Docker-native CI & CD automation platform designed to help software developers build and deploy their applications and complex microservice architectures. Featuring native integration with Kubernetes, Wercker automates your deployment workflows so you can focus on building applications.

Link: http://www.wercker.com/

Cost: Community Edition: Free; Virtual Private Pipelines: From $350/month

Monitoring

For Caylent’s insight into Container Monitoring, check out our blog post on the pros and cons of Prometheus and Grafana vs. Sysdig and Sysdig Monitor.

23. Sumo Logic

Sumo Logic is a cloud-native, log review tool that provides advanced analysis, visualization, and alerting options. The metrics monitoring solution provides real-time security and operational information, and allows you to diagnose and troubleshoot all application and infrastructure problems. Machine learning analytics also means the quick discovery and future prediction of threats and anomalies before they can become an issue and affect end-users.

Link: https://www.sumologic.com/

Cost:

  • Free: Up to 500MB/day
  • Professional: Logs & Metrics: $90/month, 1GB/day
  • Enterprise: Logs & Metrics: $150/month, 1GB/day

24. Prometheus

Developed by SoundCloud, Prometheus is an open source system-monitoring and alerting toolkit. It incorporates many aspects of monitoring such as metric generation and collection, results visualization, and alerting capabilities for when anomalies occur. Prometheus excels at recording numeric time series and complements both machine-centric monitoring as well as highly dynamic service-oriented architectures.

Link: https://prometheus.io/

Cost: Free

25. Sysdig

Sysdig open-source is the core technology behind all Sysdig products. The open-source tool is designed to provide detailed troubleshooting of a single host and works as a command-line based interface.

Link: https://www.sysdig.org/

Cost:

  • Open-source: Free
  • Basic: $20/month
  • Pro Cloud: $30/month
  • Pro Software: Varies

26. Sysdig Monitor

Sysdig Monitor (formally called Sysdig Cloud) is Sysdig's commercial solution for the generation and analysis of system-level information and real-time data. Designed as a troubleshooting tool for Linux system exploration, it provides in-depth container visibility making it incredibly useful in Docker environments.

Link: https://sysdig.com/product/how-it-works/

Cost: Flexible pricing for Cloud and Software versions

27. Datadog

Datadog is a SaaS-based data analytics platform for large-scale cloud environments that generates and collects metrics/data events from servers, databases, and applications. The full-stack monitoring service provides support for Docker, Kubernetes, and Mesos.

Link:https://www.datadoghq.com/

Cost:

  • Free up to 5 hosts
  • Pro: $15/host/month
  • Enterprise: $23/host/month

28. New Relic

An industry leader, New Relic is a pure SaaS-based performance management solution which allows developers to diagnose and fix application performance problems in real-time. Its application performance monitoring (APM) capabilities provide instant visibility, and the Linux agent within its infrastructure automatically collects Docker container metrics which are running on instrumented hosts.

Link: https://newrelic.com/

Cost:

  • Self-Hosted Environments: Pro $149/month; Essentials: $75/month
  • Cloud-Based Options: Dependant on Provider and Instance Size, Runtime, and Quantity

29. cAdvisor

Google's cAdvisor (Container Advisor) is a monitoring solution which analyzes all performance characteristics and resource usage of containers running in Docker. The tool generates and collects container metrics such as network statistics, resource isolation parameters, and a complete history of resource usage.

Link: https://github.com/google/cadvisor

Cost: Free

Logging30. Logspout

Logspout is a great tool for helping to manage the logs generated by programs running inside Docker containers. It routes container-app logs to a single location (e.g. to a JSON object or a streamed endpoint available over HTTP). Logspout also has an extensible module system.

Link: https://github.com/gliderlabs/logspout

Cost: Free

31. Fluentd

Fluentd works as an open source data collector-a container for unifying and logging all other containers' logs. With 500+ plugins, Fluentd connects to many data sources and data outputs to collect events; these are tagged to route them where needed. This tag-based routing enables complex routing to be expressed cleanly.

Link: https://www.fluentd.org/

Cost: Free

32. Logstash

Part of Elastic Stack, Logstash works well alongside Beats, Elasticsearch, and Kibana. It is an open source, server-side processing pipeline that transports and processes your logs, events, or other data.

Link: https://www.elastic.co/products/logstash

Cost: Free

33. syslog-ng

Use syslog-ng to collect logs from various sources and process them in near real-time before routing them to different destinations. A well-trusted log management infrastructure, syslog-ng combines high-performance capabilities with rich message parsing and re-writing options.

Link: https://syslog-ng.org/

Cost: Free (Pricing for syslog-ng Premium Edition available on request)

Security

34. Clair

Clair is an open source project designed to identify and analyze vulnerabilities in Docker and appc application containers. Clair regularly ingests container vulnerability metadata from a customized and configured group of sources in order to identify threats in container images, including those upstream.

Link: https://coreos.com/clair/docs/latest/

Cost: Free

35. Aqua Security

Aqua Security works on any platform to secure container-based applications by providing full-stack security. A purpose-built platform, Aqua Security allows tight control of your container environment and process from development phase and beyond. It is a comprehensive tool which provides full visibility and management.

Link: https://www.aquasec.com/

Cost: Pricing is a combination of selected software plan charges plus Azure infrastructure costs for the necessary virtual machines

36. Twistlock

Twistlock Security Suite aims to solve the issue of security in the container based application process. It is an end-to-end security solution which detects vulnerabilities by increasing the layers of monitoring for the way Docker containers work. Twistlock hardens container images and enforces security policies across an application's lifecycle.

Link: https://www.twistlock.com/

Cost: Software pricing is based on chosen subscription and infrastructure options

37. Docker Bench for Security

Docker Bench for Security is a prebuilt packaged container that can be run on any Docker host. It is a group of Bash shell scripts which should be run as a root user. The tests check for common best security practices around deploying Docker containers in production.

Link: https://hub.docker.com/r/docker/docker-bench-security/

Cost: Free


38. Docker Notary

Notary is an open-source Docker project that provides security over data collections. Run a Notary service to publish and manage arbitrary content. Digitally sign published collections and allow users to verify the integrity and origin of content.

Link: https://github.com/docker/notary

Cost: Free

Storage/Volume Management


39. Convoy

A Docker volume plugin created by Rancher for managing persistent container volumes. Convoy, an open-source Docker volume driver, can snapshot, backup, and restore Docker volumes anywhere. Create Docker volumes on AWS, supported by all the features and performance of Elastic Block Store. Also, take an existing EBS volume and use it to generate a volume attached to a Docker container.

Link: https://github.com/rancher/convoy

Cost: Free

40. Portworx

Portworx is a decentralized storage solution for persistent, shared and replicated volumes; it automates the deployment and operations of data services at scale.

Link: https://portworx.com/

Cost: Free

41. Blockbridge

The Blockbridge Volume Plugin provides high-performance storage for container applications with advanced security, mobility, backup and restore capabilities. With the 'Managed Docker Plugin' for Docker 1.13+, installation and lifecycle management is taken care of by Docker natively.

Link: http://www.blockbridge.com/

Cost: Free

Networking


42. flannel

Designed for Kubernetes, flannel is a simple and easy way to configure a secure network fabric by using a Layer 3 IPv4 network between multiple nodes in a cluster. It doesn't control how containers are networked to the host platform, only how the traffic is transported between hosts.

Link: https://coreos.com/flannel/docs/latest/

Cost: Free

43. Weaveworks

Weaveworks delivers a productive way for developers to connect, observe and control Docker containers. It creates a flexible virtual network infrastructure that connects containers which are deployed across multiple hosts. Weaveworks extends the efficiency of container orchestrators like Kubernetes and Docker Swarm and simplifies the management of containers in production.

Link: https://www.weave.works/

Cost:

  • Standard: $30 per node/month or $300 annually
  • Enterprise: $150 per node/month or $1500 annually

44. Project Calico

A highly scalable open source project, Calico provides a Layer 3 approach to virtual networking which can support a vast number of virtual machine clusters across countless compute hosts. This tool's simplified network model design supports the configuration of fine-grained connectivity policies for each of your workloads and allows SDNs to be centrally managed.

Link: https://www.projectcalico.org/getting-started/docker/

Cost: Free

Service Discovery


45. Consul

Consul is an easy-to-use, open standards-based approach to service discovery, and runs on FreeBSD, Linux, Mac OS X, Solaris, and Windows. Built to be multi-datacenter aware, Consul offers support for multiple regions without complex configuration. Key features include: service discovery, health checking, and key/value storage, etc.

Link: https://www.consul.io/

Cost: Free

46. Etcd

Created by CoreOS, etcd is a highly-available key-value store designed for shared configuration and service discovery. The tool provides a reliable way to store data over a cluster of machines. It was built especially for clusters running CoreOS, but etcd also works on other operating systems including BSD, Linux, and OS X.

Link: https://coreos.com/etcd/

Cost: Free

47. Proxy

Factorish created proxy as a simple-to-use lightweight ( < 30mb ) container. The tool is based on alpine/gliderlabs with nginx running as a HTTP load balancer.

Link: https://hub.docker.com/r/factorish/proxy/

Cost: Free

Builds


48. Packer

Packer is a Hashicorp tool created to build machine images-including Docker-and integrate with configuration management tools like Ansible, Chef, and Puppet. It is a lightweight tool which runs on every major OS from a single source configuration.

Link: https://www.packer.io/docs/builders/docker.html

Cost: Free

49. Whales

Automatically Dockerize your applications with Whales. The only thing needed is to have Docker installed and running on the host machine. Whales then works by outputting the necessary files to run your applications with Docker.

Cost: Free

50. Gradle

The Gradle plugin makes it simple for all your build scripts to talk to a Docker daemon. Each task delegates to the Docker-client, which then connects to Docker's remote API via HTTP. Most configuration parameters are optional.

Cost: Free

Management

51. Portainer

Portainer is an open-source lightweight management user interface for Docker environments. Portainer works on top of the Docker API and provides a detailed overview of Docker. Capabilities include the ability to manage containers, images, networks, and volumes.

Link:https://portainer.io/

Cost: Free

And that's the complete list! Thanks for reading!

Originally published on https://dzone.com


Further reading

☞ Docker and Kubernetes: The Complete Guide

☞ Docker Mastery: The Complete Toolset From a Docker Captain

☞ Docker for the Absolute Beginner - Hands On - DevOps

☞ How to debug Node.js in a Docker container?

☞ Docker Containers for Beginners

☞ Deploy Docker Containers With AWS CodePipeline

☞ Build Docker Images and Host a Docker Image Repository with GitLab

☞ How to create a full stack React/Express/MongoDB app using Docker

Mobile App Development Company India | Ecommerce Web Development Company India

Mobile App Development Company India | Ecommerce Web Development Company India

Best Mobile App Development Company India, WebClues Global is one of the leading web and mobile app development company. Our team offers complete IT solutions including Cross-Platform App Development, CMS & E-Commerce, and UI/UX Design.

We are custom eCommerce Development Company working with all types of industry verticals and providing them end-to-end solutions for their eCommerce store development.

Know more about Top E-Commerce Web Development Company

10 docker-compose and docker commands that are useful for active development

10 docker-compose and docker commands that are useful for active development

The following article Lina Rudashevski introduces 10 commands that docker-compose and docker are useful for positive development.

Originally published by Lina Rudashevski at dev.to

Sure you might need other ones but I've found over time that these are the only ones I need or use on a regular basis, and I use Docker and docker-compose regularly for various projects.

1. terminal into the docker container

docker exec -it :container_id bash

You may need to terminal into a container to do things like run tests or apply migrations.

[13:54:41] (master) selfies
🙋 docker ps
CONTAINER ID        IMAGE                  COMMAND                  CREATED             STATUS              PORTS                    NAMES
b5e87b73f6f6        selfies_web            "python manage.py ru…"   2 seconds ago       Up 1 second         0.0.0.0:8000->8000/tcp   selfies_web_1
d8e636ad4805        postgres:10.1-alpine   "docker-entrypoint.s…"   3 seconds ago       Up 2 seconds        0.0.0.0:5432->5432/tcp   selfies_db_1
aeb5cba5a482        redis:latest           "docker-entrypoint.s…"   3 seconds ago       Up 2 seconds        6379/tcp                 selfies_redis_1
[13:54:43] (master) selfies
🙋 docker exec -it b5e87b73f6f6 bash
[email protected]:/selfies# python manage.py makemigrations
No changes detected
[email protected]:/selfies# 

2. run the docker container in debug mode

docker-compose run --service-ports web

If you want to debug your server, this command will let you do it. Otherwise you may get an error if you put a debugger in your code.

[13:56:59] (master) selfies
🙋 docker-compose run --service-ports web
Creating network "selfies_default" with the default driver
Creating selfies_redis_1 ... done
Creating selfies_db_1    ... done
Performing system checks...

System check identified no issues (0 silenced).
July 24, 2019 - 17:57:11
Django version 2.1.7, using settings 'selfies.settings'
Starting ASGI/Channels version 2.2.0 development server at http://0.0.0.0:8000/
Quit the server with CONTROL-C.
Performing system checks...

System check identified no issues (0 silenced).
July 24, 2019 - 18:12:29
Django version 2.1.7, using settings 'selfies.settings'
Starting ASGI/Channels version 2.2.0 development server at http://0.0.0.0:8000/
Quit the server with CONTROL-C.
HTTP OPTIONS /app/users/ 200 [0.01, 172.25.0.1:60046]
> /selfies/app/views/account_views.py(48)post()
-> try:
(Pdb)

3. build the docker container

docker-compose build

This runs everything in the Dockerfile. I usually run this the first time to build the project, and after that only if I add dependencies to my requirements.txt file or change anything within my Dockerfile.

[18:59:42] (master) selfies
// ♥ docker-compose build
db uses an image, skipping
redis uses an image, skipping
Building web
Step 1/7 : FROM python:3.6-stretch
---> 9167692c277e
Step 2/7 : ENV PYTHONUNBUFFERED 1
---> Using cache
---> 0533dfe1c141
Step 3/7 : ENV REDIS_HOST "redis"
---> Using cache
---> c01adb015773
Step 4/7 : RUN mkdir /selfies
---> Using cache
---> e60377d4e9ee
Step 5/7 : WORKDIR /selfies
---> Using cache
---> 9018fb3984b0
Step 6/7 : ADD . /selfies/
---> Using cache
---> 8c6d291d99a7
Step 7/7 : RUN pip install -r requirements.txt
---> Using cache
---> 7caa2f3bf2ac
Successfully built 7caa2f3bf2ac
Successfully tagged selfies_web:latest

4. start the docker container

docker-compose up

This will run your container/s in the terminal and will show the server output

[13:39:32] (master) selfies
🙋 docker-compose up
Creating network "selfies_default" with the default driver
Creating selfies_redis_1 ... done
Creating selfies_db_1 ... done
Creating selfies_web_1 ... done
Attaching to selfies_db_1, selfies_redis_1, selfies_web_1
db_1 | 2019-07-24 17:40:36.069 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
db_1 | 2019-07-24 17:40:36.069 UTC [1] LOG: listening on IPv6 address "::", port 5432
redis_1 | 1:C 24 Jul 2019 17:40:36.085 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis_1 | 1:C 24 Jul 2019 17:40:36.085 # Redis version=5.0.5, bits=64, commit=00000000, modified=0, pid=1, just started
redis_1 | 1:C 24 Jul 2019 17:40:36.085 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
redis_1 | 1:M 24 Jul 2019 17:40:36.086 * Running mode=standalone, port=6379.
redis_1 | 1:M 24 Jul 2019 17:40:36.086 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
redis_1 | 1:M 24 Jul 2019 17:40:36.086 # Server initialized
redis_1 | 1:M 24 Jul 2019 17:40:36.086 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
redis_1 | 1:M 24 Jul 2019 17:40:36.086 * Ready to accept connections
db_1 | 2019-07-24 17:40:36.072 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db_1 | 2019-07-24 17:40:36.086 UTC [18] LOG: database system was shut down at 2019-07-24 17:39:28 UTC
db_1 | 2019-07-24 17:40:36.090 UTC [1] LOG: database system is ready to accept connections
web_1 | Performing system checks...
web_1 |
web_1 | System check identified no issues (0 silenced).
web_1 | July 24, 2019 - 17:40:38
web_1 | Django version 2.1.7, using settings 'selfies.settings'
web_1 | Starting ASGI/Channels version 2.2.0 development server at http://0.0.0.0:8000/
web_1 | Quit the server with CONTROL-C.

5. start the docker container in the background

docker-compose up -d

This will run the container but in the background so you can continue to type in the terminal. I usually run it this way if I don't really need to see what the server is returning.

[13:31:03] (master) selfies
🙋 docker-compose up -d
Creating network "selfies_default" with the default driver
Creating selfies_db_1 ... done
Creating selfies_redis_1 ... done
Creating selfies_web_1 ... done

6. see all of the docker containers currently running

List of active docker containers which is useful for the CONTAINER ID and to know what you have running.

docker ps

[13:31:10] (master) selfies
🙋 docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a2b93a900c36 selfies_web "python manage.py ru…" 2 seconds ago Up 1 second 0.0.0.0:8000->8000/tcp selfies_web_1
2d39a1161aa2 postgres:10.1-alpine "docker-entrypoint.s…" 4 seconds ago Up 2 seconds 0.0.0.0:5432->5432/tcp selfies_db_1
62a6f364860e redis:latest "docker-entrypoint.s…" 4 seconds ago Up 2 seconds 6379/tcp selfies_redis_1

7. remove all docker containers in the repository

docker-compose down

I almost always follow this command with docker ps to make sure the containers were successfully removed, out of habit.

[13:37:20] (master) selfies
🙋 docker-compose down
Stopping selfies_web_1 ... done
Stopping selfies_db_1 ... done
Stopping selfies_redis_1 ... done
Removing selfies_web_1 ... done
Removing selfies_db_1 ... done
Removing selfies_redis_1 ... done
Removing network selfies_default

8. remove a specific docker container

docker kill :container_id

The container id is the leftmost column when doing docker ps. I sometimes do this if I need to remove a specific container that I'm not using.

[13:51:43] (master) selfies
🙋 docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
274b1605ca94 selfies_web "python manage.py ru…" 11 minutes ago Up 1 second 0.0.0.0:8000->8000/tcp selfies_web_1
a641f449edfc postgres:10.1-alpine "docker-entrypoint.s…" 11 minutes ago Up 2 seconds 0.0.0.0:5432->5432/tcp selfies_db_1
61b08693e242 redis:latest "docker-entrypoint.s…" 11 minutes ago Up 2 seconds 6379/tcp selfies_redis_1
[13:51:44] (master) selfies
🙋 docker kill 274b1605ca94
274b1605ca94

9. view all of the docker images

You can see all your builds by running this. For me these are either official "images" like redis or python or old builds of my projects. I only occasionally use this, it's not really a part of my daily development.

docker images

[18:28:17] (master) selfies
// ♥ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
selfies_web latest 4869d063569e 7 days ago 1.32GB
python 3.6-stretch 9167692c277e 11 days ago 936MB
redis latest 598a6f110d01 12 days ago 118MB
<none> <none> 9c4676224e86 2 months ago 1e+03MB
<none> <none> 6c925f68c3a9 2 months ago 929MB
<none> <none> b44ef8ff52f4 2 months ago 929MB
<none> <none> 903b976cd478 2 months ago 1.47GB
<none> <none> f7009c6f0868 2 months ago 1.49GB
<none> <none> 52750c0c3926 2 months ago 1.48GB
<none> <none> 1c509a380925 2 months ago 1.44GB

10. clean out any images, builds, etc., that might be hanging

docker system prune

I only occasionally use this, it's not really a part of my daily development.

[18:18:35] (master) selfies
// ♥ docker system prune
WARNING! This will remove:
- all stopped containers
- all networks not used by at least one container
- all dangling images
- all build cache
Are you sure you want to continue? [y/N] y
Deleted Containers:
1f570bbf6828dadfdaa97655165943fd0b93ce6c185df2531f61a82982ec24f2
40f79091bc943c86f5f3ab7bc9d484ac9b576effc686a8a0fdb0031a465b16b4
f3399b0cd4f8c30159b15e1a2027aadeeaf9006efa4b759e4e3586d4589a0004
e0d18cddd40241de3d3b03d695afe667819c884a12fd36465c4c6d584df5aaa6
b7757cef15b49ecfe58ac6a8de3f8fcae91c71d793b7942955ccaf7c266bff92
a8fc94cd1af14f27b0ae22c1728b33fc8cef4090aa7deef1c2549c33755ed114
4de12efd1f88b9ee3541049c9b6fb3df5b1ade3b5787f888f5cf05f2e02c3cec
21d97261412949c06a4fcfb9846a6dee22f92e6a928cd6fb715ee81924917d43
073ca414e8c79e593c82f46f565adbae92a159994699dbbd0fb9df8044b3b1bb
b62f36a4a182479d25c2251e8d90fb7d2b612f31a03e943e83882ab436981879
456510a02d7ad5137dcb907484b2c8d9e07f51946be1103d294e4e253bc0e664
effee0d0a9afa74825f8f820bd363ebe1b7b54948aed38d57e84342482c367fd
5d930ece03ed8a2c2cb9178b81c9b42ef4c7397ef90d29b040ed3b1220f8ba27
a6ccf4f68831a19ab7381354f5643f3afd94cfbe0d066ff9ce4b248b90139a63
1a65f709f9b9c7d9749a04e88d3c4d18539a495160e143337c25025b10f9b24c
e98fbb022cb920dd4550751fdb735c1f73ae1dd6a049b9855bd77db1a2cbb3d1
18cb48bcb6428d4a9d5ca2f4b9c0a2fbedb3ef98c1d1fe6788029d7abea8efe9
97d0ee4625df7d107bc543318b1b45701f17720c41c7bb9614183e2cca0e26c7
5fafd4e2df31a0b84657ce1a0450c9cc8d8caa56ede9b10cddbfa6b6f55f6b50
212dae9eab339a84817b590cceb345d66290fa7f0fd7e347bffda322eb60400e
14cdd7e40ca412e1b091ddf640513ecf3f5f8bfd51cbc826e59b4901b1a0e213
ceeeb46b3aa52660a7080949543654e6436b0c050c865ef6cbed83f43bba8cc3
6c96d28cffed031a8bdd836670401b74eb52fa8f03c1dca83b73b8d0ba8530ec
9c89d36c6ee1f8fbc9d0c542d14d6d5b924817abf47a656941062eed95e607f6
58d212388ac7f15468306e306977661169e8aacdeeaba2fea4fc9cf7ebbb9e46
71963edbfe38d4578ba1338a0d03ed94f81664b202f969acf72d38ceeded5fed
4838aa870e8962e6a1c8c0e679dad8d25f5ad08824bfd45df150d148ae7097ba
abab59a1cd1fcf0a14e1d8f45d03f1787b218233a118af59f604ad890cc64dc1
5375b62e20d2660f8347f5f7355122f9fb528a1b603b1e58ceb7d7b811740410
29d7238e6d81f522f8c98b4d2e478bb304aec7a00892b8339bf1b4a0483e7040

Deleted Networks:
selfiesh_default

Originally published by Lina Rudashevski at dev.to

========================================

Thanks for reading :heart: If you liked this post, share it with all of your programming buddies! Follow me on Facebook | Twitter

Learn More

☞ Docker Mastery: The Complete Toolset From a Docker Captain

☞ Docker and Kubernetes: The Complete Guide

☞ Docker for the Absolute Beginner - Hands On - DevOps

☞ Docker Crash Course for busy DevOps and Developers

☞ The Docker for DevOps course: From development to production

☞ Docker for Node.js Projects From a Docker Captain

☞ Docker Certified Associate 2019

☞ Selenium WebDriver with Docker