Question-50: Docker has the ability to autonomously construct images by reading the instructions that are included inside a Dockerfile. A Dockerfile is a text document that includes all of the instructions that a user may use on the command line to construct an image. This document is called a Dockerfile. Your team's application was successfully deployed in Google Container Engine using the Dockerfile that was provided below by one of your team's engineers. They have indicated that the application deployments are taking an excessive amount of time. You want to ensure that the functionality of the application is not compromised when optimising this Dockerfile in order to achieve quicker deployment timings. If the downloading of the dependencies required to construct your Docker image takes a significant amount of time, it is a good idea to examine whether or not you are installing more software than is strictly necessary. First, you should check to see if there is a possibility that you are obtaining development dependencies that are in no way required by your picture. What are the two steps that you need to take?(Choose two.) FROM ubuntu:17 COPY . /src RUN apt-get update && apt-get install python python-pip RUN pip install -r quicktechie.txt
A. Uninstall Python after running the pip command.
B. Remove dependencies from requirements.txt.
C. Make use of a base image that has been minimized, such as Alpine Linux.
D. Make use of larger machine types when creating node pools for your Google Container Engine.
E. Make a copy of the source code once all of the necessary package dependencies, including Python and pip, have been installed.
Correct Answer

Get All 340 Questions and Answer for Google Professional Cloud Architect

: 3,5 Explanation: > Option-3 & Option-5: Smaller the base image with minimum dependency faster the container will start. Docker image build uses caching. Docker Instructions sequence matter because application’s dependencies change less frequently than the Python code which will help to reuse the cached layer of dependency and only add new layer for code change for Python Source code. Use a slimmed-down base image like Alpine Linux E. Copy the source after he package dependencies (Python and pip) are installed.it will help as it is one of the best practices to make use of lighter image if possible Option-4 -Not helpful Option-5 -is the best practice to do the steps that changes more frequently at the end . so copy . should be performed at last as it will be changing more frequently and we can make use of docker caching hence Answer Option-5 is most then Option-3. pip installs on alpine will take forever as you'll end up having to compile a lot of stuff; best get rid of that `copy .` operation though. Option-5 makes sense if you're building locally in an environment with caching, but in a CI/CD system there will be no impact. Very strange question.