Skip to main content

Docker Commands: docker exec

Docker Commands: docker exec


docker exec

Run a new process in an already running container

Use docker exec to run a secondary process inside a container.

Let's say the Nginx web proxy container is running in detached (-d) mode, you can use docker exec to start another process in that container. In the example below, the process status command, ps is run inside the Nginx container.

Note: If the container is stopped, it must first be started with docker start.


Creative Commons License Licensed under a Creative Commons Attribution 4.0 International License.

Comments

Popular posts from this blog

3.2.13 DNS poisoning and ARP poisoning

DNS poisoning and ARP poisoning DNS and ARP poisoning are types of man-in-the-middle (MITM) attacks, which are types of spoofing attacks. A spoofing attack is an attempt by someone to masquerade as someone else. Address Resolution Protocol (ARP) cache poisoning (sometimes also known as ARP Poison Routing) allows an attacker on the same network segment (subnet) as its victims to eavesdrop on all network traffic between the victims. ARP poisoning, tries to convince the network that the attacker's MAC address is the one associated with an IP address so that traffic sent to that IP address is wrongly sent to the attacker's machine. In ARP poisoning, the MAC (Media Access Control) address table of the victim host is ‘poisoned’ with false data. Incorrect data for a victim host is interjected into the MAC table of the victim host to force the victim to communicate with the wrong host. By faking this value, it is possible to make it look as if the data came from a network that

Docker Command Flowchart

Docker Command Flowchart Inspired by a post at www.troubleshooters.com this flowchart illustrates some of the Docker objects and the commands that apply to them. For example, to preserve changes made in a container object and convert it into an image , use the docker commit command. References: http://www.troubleshooters.com/linux/docker/docker_newbie.htm Licensed under a Creative Commons Attribution 4.0 International License .

Docker Compose

Docker Compose Particularly with multi-tiered applications, your Dockerfile and runtime commands get increasingly complex. Docker Compose is a tool to streamline the definition and instantiation of multi-tier, multi-container Docker applications. Compose requires a single configuration file and a single command to organize and spin up the application tier. Docker Compose simplifies the containerization of a multi-tier, multi-container application, which can be stitched together using the docker-compose.yml configuration file and the docker-compose command to provide a single application service. The Compose file provides a way to document and configure all of the application’s service dependencies (databases, queues, caches, web service APIs, etc.) Docker Compose defines and runs complex services: define single containers via Dockerfile describe a multi-container application via single configuration f