
Docker & Containerization
Dockerfile for Node.js/NestJS, docker-compose (Node + DB + Redis), multi-stage builds, image optimization, .dockerignore, volumes, networks, container orchestration basics
1What is Docker?
What is Docker?
Câu trả lời
Docker is a containerization platform that packages an application and its dependencies into an isolated container. Unlike virtual machines that virtualize hardware, Docker shares the host OS kernel, making it lightweight and fast. Using Docker ensures the application runs identically in development, staging, and production.
2What is the main difference between a Docker container and a virtual machine?
What is the main difference between a Docker container and a virtual machine?
Câu trả lời
A Docker container shares the host OS kernel and virtualizes only the user space, making it very lightweight (few MB) and starts in seconds. A VM virtualizes complete hardware and includes a full OS (several GB), starting in minutes. Containers are therefore more efficient for microservices and CI/CD.
3What is the role of the Dockerfile?
What is the role of the Dockerfile?
Câu trả lời
The Dockerfile is a text file containing instructions to build a Docker image. Each instruction (FROM, COPY, RUN, CMD) creates a layer in the image. It defines the runtime environment, dependencies, and startup command. A well-optimized Dockerfile uses layer caching and multi-stage builds to reduce final image size.
Which Dockerfile instruction defines the base image?
What is the difference between CMD and ENTRYPOINT in a Dockerfile?
+22 câu hỏi phỏng vấn
Các chủ đề phỏng vấn Node.js / NestJS khác
Node.js Fundamentals
Node.js Core APIs
Asynchronous Programming
Express.js Basics
NestJS Fundamentals
REST API Design
Validation & DTO
API Documentation & Contracts
Error Handling
Unit Testing
Task Scheduling
NestJS Modules & DI
Configuration & Environment Management
JWT Authentication
Authorization & RBAC
Database with TypeORM
Prisma ORM
Middleware & Interceptors
File Upload
WebSockets
GraphQL with NestJS
End-to-End Testing
Caching with Redis
Queues with Bull
DevOps, Logging & CI/CD
Microservices
Security Best Practices
Performance & Cloud Deployment
Nắm vững Node.js / NestJS cho lần phỏng vấn tiếp theo
Truy cập tất cả câu hỏi, flashcards, bài kiểm tra kỹ thuật, bài tập code review và mô phỏng phỏng vấn.
Bắt đầu miễn phí