Junior — Middle
What is the purpose of dividing data into parts in a database or system?
sobes.tech AI
Answer from AI
A minimal Dockerfile for containerizing an application usually contains a base image, copying source code, and a run command. For example, for a simple Node.js app:
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
CMD ["node", "index.js"]
Here:
FROMspecifies the base imageWORKDIRsets the working directoryCOPYcopies files into the containerRUNinstalls dependenciesCMDdefines the container's startup command
For other languages and applications, the structure is similar: base image, copy, install dependencies, run.