Question: solution with details and code in seed Lab Environment In this lab, we use three machines, one for client, one for server, and the other
solution with details and code in seed
Lab Environment
In this lab, we use three machines, one for client, one for server, and the other for proxy. We will use
containers for these machines. Their IP addresses are listed in the following:
client:
server:
proxy:
Container Setup and Commands. Please download the Labsetup.zip file to your VM from the labs
website, unzip it enter the Labsetup folder, and use the dockercompose.yml file to set up the lab
environment. Detailed explanation of the content in this file and all the involved Dockerfile can be
found from the user manual, which is linked to the website of this lab. If this is the first time you set up a
SEED lab environment using containers, it is very important that you read the user manual.
$ dockercompose build # Build the container image
$ dockercompose up # Start the container
$ dockercompose down # Shut down the container
Aliases for the Compose commands above
$ dcbuild # Alias for: dockercompose build
$ dcup # Alias for: dockercompose up
$ dcdown # Alias for: dockercompose down
All the containers will be running in the background. To run commands on a container, we often need
to get a shell on that container. We first need to use the "docker ps command to find out the ID of
the container, and then use "docker exec" to start a shell on that container. We have created aliases for
them in the bashrc file.
$ dockps Alias for: docker ps format IDNames
$ docksh Alias for: docker exec it binbash
The following example shows how to get a shell inside hostC
$ dockps
be hostA
afeaaee hostB
cea hostC
$ docksh
root@cea:#
Note: If a docker command requires a container ID you do not need to
type the entire ID string. Typing the first few characters will
be sufficient, as long as they are unique among all the containers.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
