Exercises Flashcards
1
Q
FROM node:alpine
A
Use docker base image
2
Q
RUN mkdir -p usr/src/server
A
Create application directory
3
Q
WORKDIR /usr/src/server
A
Set working directory of the container for all RUN commands
4
Q
COPY package.json /usr/src/server/
A
Copy package.json file which contain all dependencies required for application
5
Q
RUN npm install
A
Install dependencies from package.json
6
Q
COPY . /usr/src/server
A
Copy all other files from local machine to container
7
Q
EXPOSÉ 3000
A
xpose container port to the host machine
8
Q
CMD [ “node”
“server. js”]
A
A start command to run the application