02 - DOCKER BASICS Flashcards
what are the issues with adding servers manually
why do we need docker ?
docker provides environment isolation
what is kubernetes ?
Kubernetes is a tool for running a bunch of different containers
what is a kubernetes cluster
hows is kubernetes managed
sample dockerfile to containerize a project
FROM node:alpine
WORKDIR /app
COPY package.json
RUN npm install
COPY ./ ./
CMD [“npm”, “start”]
what is the .dockerignore file
command to build a docker image
docker build -t [tag-name] .
create and start a container by image_id or tag
docker run [image-id or tag]
create and start a container, overriding the default command
docker run -it [image-id or tag] [cmd]
print out information about all of the running containers
docker ps
execute the given command in a running container
docker exec -it [container id] [cmd]
print out logs from the given container
docker logs [container id]