Haylie  Conn

Haylie Conn

1619466120

A Makefile Example with Docker Compose Commands

In this example we are going to keep docker compose commands in Makefile and use make command to interact with them.

Available commands

All commands are listed below as follows. The TAG and ENV variables are compulsory unless they are set on server level.

make build TAG=latest ENV=dev

Builds all images.

make start TAG=latest ENV=dev

Starts all containers. The test and dev env will have application exposed to the host OS. In the case of prod and stag env, the application will be baked into the container so it won’t be exposed to the host OS.

make stop TAG=latest ENV=dev

Stops all containers.

make restart TAG=latest ENV=dev

Restarts all containers.

#docker #linux #makefile

What is GEEK

Buddha Community

A Makefile Example with Docker Compose Commands
August  Murray

August Murray

1615008840

Top 24 Docker Commands Explained with Examples

In my previous blog post, I have explained in detail how you can Install Docker and Docker-compose on Ubuntu

In this guide, I have explained the Top 24 Docker Commands with examples.

Make sure you have sudo or root privileges to the system.

Docker Commands

  1. The command to check the version of Docker installed.
  2. To look/search for available docker images from the Docker registry.
  3. To pull docker images from the Docker registry.
  4. Listing all the docker images
  5. Creating / Running docker container from Docker image.
  6. To list the actively running docker containers.
  7. To list all the docker containers
  8. To stop a Container
  9. To start a Container
  10. To restart a Docker container
  11. To login to running Docker container
  12. To delete the stopped Docker containers
  13. To delete Docker images from the Local system
  14. To check logs of a running Docker container
  15. Killing docker containers
  16. Log in to Docker Hub registry (hub.docker.com)
  17. Removing docker hub registry login from the system.
  18. Check active resource usage by each containers
  19. Rename a Docker container
  20. To display system wide information of Docker
  21. Inspecting a Docker container
  22. Building docker images from Docker file
  23. Creating new docker images from a Container
  24. Pushing Docker images from Local to Docker registry.

#docker #docker-command #containers #docker-compose #docker-image

Iliana  Welch

Iliana Welch

1595249460

Docker Explained: Docker Architecture | Docker Registries

Following the second video about Docker basics, in this video, I explain Docker architecture and explain the different building blocks of the docker engine; docker client, API, Docker Daemon. I also explain what a docker registry is and I finish the video with a demo explaining and illustrating how to use Docker hub

In this video lesson you will learn:

  • What is Docker Host
  • What is Docker Engine
  • Learn about Docker Architecture
  • Learn about Docker client and Docker Daemon
  • Docker Hub and Registries
  • Simple demo to understand using images from registries

#docker #docker hub #docker host #docker engine #docker architecture #api

Haylie  Conn

Haylie Conn

1619466120

A Makefile Example with Docker Compose Commands

In this example we are going to keep docker compose commands in Makefile and use make command to interact with them.

Available commands

All commands are listed below as follows. The TAG and ENV variables are compulsory unless they are set on server level.

make build TAG=latest ENV=dev

Builds all images.

make start TAG=latest ENV=dev

Starts all containers. The test and dev env will have application exposed to the host OS. In the case of prod and stag env, the application will be baked into the container so it won’t be exposed to the host OS.

make stop TAG=latest ENV=dev

Stops all containers.

make restart TAG=latest ENV=dev

Restarts all containers.

#docker #linux #makefile

Henry Short

Henry Short

1580104680

List all containers in Docker(Docker command)

We can get a list of all containers in docker using docker container list or docker ps commands.

List Docker Containers

To list down docker containers we can use below two commands

  • docker container list
  • docker ps

docker container ls command introduced in docker 1.13 version. In older versions we have to use docker ps command.

List all Containers in docker, using docker ls command

The below command returns a list of all containers in docker.

docker container list -all

or

docker container ls -all

List all containers in docker, using docker ps command

In older version of docker we can use docker ps command to list all containers in docker.

$ docker ps -all

or

$ docker ps -a

List all Running docker containers

The default docker container ls command shows all running docker containers.

$ docker container list

or

$ docker container ls

or

To get list of all running docker containers use the below command

$ docker ps

List all stopped docker containers command

To get list of all stopped containers in docker use the below commands

$ docker container list -f "status=exited"

or

$ docker container ls -f "status=exited"

or you can use docker ps command

$ docker ps -f "status=exited"

List all latest created docker containers

To list out all latest created containers in docker use the below command.

$ docker container list --latest

Show n last created docker containers

To display n last created containers in docker use the below command.

$ docker container list --last=n

#docker #docker-container #docker-command

Examples of the dig command in Linux

Dig Command Line Options and Examples
Here is the frequently used command line options and example’s of dig command.
1. Basic Dig Command
A basic dig command accept domain name as command line parameter and prints Address record.
2. Query With Specific DNS Server
The default dig command queries to dns server configured on your system. For example, the Linux systems keep default DNS entry in /etc/resolv.conf.
3. Print Short Answer
Use +short command line option to print result in short form. This is basically useful with the shell scripting and other automation tasks.
4. Print Detailed but Specific Result
Use +noall with +answer to print detailed information but specific. This will print only answer section including few more details as a result.

#linux commands #command #dig #dig command #useful examples #linux