This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Command | Description | |
---|---|---|
docker version | Displays Docker version information. | |
docker info | Shows detailed information about the Docker installation and system. | |
docker login | Logs into a Docker registry. | |
docker logout | Logs out from a Docker registry. | |
docker search <image-name> | Searches for Docker images in a registry. | |
docker stats | Shows real-time resource usage statistics of running containers. | |
docker events | Streams real-time events from the Docker server. | |
docker kill <container-id> | Forcibly stops a running container. | |
docker network ls | Lists all Docker networks. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Command | Description | |
---|---|---|
docker ps | Lists all running containers. | |
docker ps -a | Lists all containers (including stopped ones). | |
docker run <image-name> | Creates and starts a new container from the specified image. | |
docker run -d <image-name> | Runs a container in detached mode (in the background). | |
docker run -it <image-name> | Runs a container interactively (for terminal access). | |
docker stop <container-id> | Stops a running container. | |
docker start <container-id> | Starts a stopped container. | |
docker restart <container-id> | Restarts a container. | |
docker rm <container-id> | Removes a stopped container. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Command | Description | |
---|---|---|
docker images | Lists all images stored locally. | |
docker pull <image-name> | Downloads the specified image from a registry. | |
docker build -t <image-name> . | Builds a Docker image from the Dockerfile in the current directory and tags it. | |
docker tag <image-id> <new-name> | Assigns a new tag to an existing Docker image. | |
docker rmi <image-id> | Removes the specified image from your local system. | |
docker history <image-name> | Displays the layers and history of a Docker image. | |
docker inspect <image-name> | Shows detailed information about the specified Docker image. | |
docker save -o <file-name>.tar <image-name> | Saves a Docker image to a .tar archive. | |
docker load -i <file-name>.tar | Loads a Docker image from a .tar archive. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
zookeeper: | |
image: confluentinc/cp-zookeeper:6.2.0 | |
environment: | |
ZOOKEEPER_CLIENT_PORT: 2181 | |
volumes: | |
- zookeeper_data:/var/lib/zookeeper/data | |
- zookeeper_logs:/var/lib/zookeeper/log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Reduce complexity of the code | |
public boolean isOrderValid(Order order) { | |
if (order != null) { | |
if (order.getItems() != null && !order.getItems().isEmpty()) { | |
for (OrderItem item : order.getItems()) { | |
if (item.getQuantity() > 0) { | |
// Validate item | |
} else { | |
return false; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AccountOpenedEvent { | |
private String accountId; | |
private String customerDetails; | |
private String accountOpeningDetails; | |
private int version; // Add a version field | |
} | |
@Component | |
public class AccountOpenedEventHandler { | |
private List<AccountOpenedEventProcessor> processors; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Description | Command | |
---|---|---|