Devops interview scenario question

ยท

1 min read

Good morning guys, you applied for a job role in devops and you were given the below in a technical interview.

FROM node: latest

WORKDIR /app

COPY package*.json

RUN yarn install

COPY . .

EXPOSE 3000

CMD ["yarn" , "start"]

Now the Questions:

  1. The file above is meant to do what and what is it called

  2. Assuming you got the above right what does each step meant to do, explain

  3. The file above generated an image size of 1.200GB obviously too big for deployment ,your team lead now ask you to reduce the size to the nearest minimum, what step will you take to achieve this.

  4. What logical command should follow after this, write it out?.

    Remember your response must follow Devops best practices ๐Ÿƒ๐Ÿƒ๐Ÿƒ

ย