Exercises Flashcards

1
Q

FROM node:alpine

A

Use docker base image

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

RUN mkdir -p usr/src/server

A

Create application directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

WORKDIR /usr/src/server

A

Set working directory of the container for all RUN commands

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

COPY package.json /usr/src/server/

A

Copy package.json file which contain all dependencies required for application

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

RUN npm install

A

Install dependencies from package.json

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

COPY . /usr/src/server

A

Copy all other files from local machine to container

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

EXPOSÉ 3000

A

xpose container port to the host machine

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

CMD [ “node”
“server. js”]

A

A start command to run the application

How well did you know this?
1
Not at all
2
3
4
5
Perfectly