WorksheetsDocker-Containers
Total questions: 10
Worksheet time: 6mins
docker run --name elastic_training_ --net training_net -p 9200:9300 -it -m 1GB -v docker.elastic.co/elasticsearch/elasticsearch:8.12.2
Local port 9200 maps to container port 9300
Local port 9300 maps to container port 9300
To solve this error: "Error response from daemon: Conflict. The container name "/kibana_training_" is already in use by container"
1. stop container
2 remove container
3 restart container with same name
1. stop container
2. restart container with same name
1. stop container
2. remove container
3. start container with same name
1. remove container
2. stop container with same name
Which command fix this "max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]"?
sysctl -w vm.max_map_count=262144
sysctl vm.max_map_count=262144
sysctl -v m.max_map_count=262144
sysctl -x vm.max_map_count=262144
Create a network NETWORK and add a container CONTAINER to this network
1. docker network create NETWORK
2. docker network add NETWORK CONTAINER
1. docker network create NETWORK
2. docker network connect NETWORK CONTAINER
1. docker network add NETWORK
2. docker network connect NETWORK CONTAINER
1. docker network connect NETWORK
2. docker network connect NETWORK CONTAINER
This docker-compose will not work...
Still pending mapping port
Still pending network definition
Still pending the volumes
Still pending ENV variables
Is it possible to create different containers with just one Image?
Yes, with the same container name
Yes, with different container name
No, a new image must be downloaded to create other container
N/A
docker network inspect training_net
Show network properties
Show network properties and containers added in this Network
Wrong command
Command deprecated
You see this error : max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]" ..when...
Try run docker command and there is an issue with mem
Try to download an image and there is and issue on the volume
Try to create a network and you do not have auth
Try to add a container to a network without priviliges
You have a container A attached to a NETWORK A. If you attach container A to a NETWORK B
Container A will change to NETWORK B
Container A will remain in NETWORK A and will be added to NETWORK B
Error: Container A must be detached from NETWORK A first
Error: You cannot attach containers to networks
This command docker exec -it elastic_training_2 /bin/bash
Raise an error
Open a terminal inside container
Open a terminal in WSL Windows
Bad Syntax
