by XDK
19. September 2019 18:37
by XDK
31. August 2019 10:39
Explanation:
Open ECR option in Amazon Console Management.
Note: Click on "View Push Commands" to get the command help.
Retrieve the login command to use to authenticate your Docker client to your registry.
Use the AWS CLI: How to install & configure AWS CLI?
$(aws ecr get-login --no-include-email --region us-east-1)
Note: If you receive an "Unknown options: --no-include-email" error when using the AWS CLI, ensure that you have the latest version installed. Learn more
Build your Docker image using the following command. For information on building a Docker file from scratch see the instructions here . You can skip this step if your image is already built:
ubuntu@ip-172-31-43-31:~$ docker build -t xdkrepo/helloworld .
After the build completes, tag your image so you can push the image to this repository:
ubuntu@ip-172-31-43-31:~$ docker tag xdkrepo/helloworld:latest 565903328921.dkr.ecr.us-east-1.amazonaws.com/xdkrepo/helloworld:latest
Run the following command to push this image to your newly created AWS repository:
ubuntu@ip-172-31-43-31:~$ docker push 565903328921.dkr.ecr.us-east-1.amazonaws.com/xdkrepo/helloworld:latest
by XDK
28. August 2019 22:11
Explanation:
To uninstall docker
sudo apt-get purge docker-ce
sudo rm -rf /var/lib/docker
Note: The output of the below command will provide you with information the installed package software, version, architecture and short description about the package. grep command is used to find the docker package
sudo dpkg --get-selections | grep docker | cut -f 1
sudo apt-get remove --purge <package name from the previous command output>
sudo whereis docker
sudo rm -rf <directory/file path from the previous command output>
by XDK
28. August 2019 09:31
Explanation:
* Containers and virtual machines both have similar resource allocation and allocation benefits.
* Containers and VMs are functionally different because containers virtualise the Operating System and VMs are virtualise the hardware.
* Containers are just processes
by XDK
25. August 2019 17:49
Explanation:
ubuntu@ip-172-31-59-138:/opt/HelloWorld$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
xdk_helloworld latest a801afaa1782 20 seconds ago 473MB
tomcat jre8 3639174793ba 3 months ago 463MB
Command to run the xdk_helloworld docker image, to listen to the port 80 and route to 8080 in the container which is the tomcat's default port 8080 at runtime.
ubuntu@ip-172-31-59-138:/opt/HelloWorld$ docker run -p 80:8080 xdk_helloworld
Open http://34.204.171.134/HelloWorld/ in a browser to see the HelloWorld web is application running.