Docker container exits immediately with code 0

posée a month ago216 vuesen

1

My container runs and exits right away.

FROM node:20
COPY . .
RUN npm ci
CMD npm start

docker ps -a shows Exited (0). The app is a long-running server. What am I missing?

🤖 Diagnostic IA

Généré par IA. Ce n'est pas une réponse — la communauté ci-dessous le confirme ou le corrige. Vérifiez toujours avant de vous y fier.

posée a month ago

3 réponses

8

Lakehouse for the silver layer if you want Spark notebooks and Delta; Warehouse if your team is SQL-first. Pipelines orchestrate, notebooks transform. Keep bronze as raw files, silver as cleaned Delta tables, gold as a star schema.

Connectez-vous pour dire si ça a marché.

answered a month ago
7

Yes, use a bridge table. Create a distinct dimension with unique keys, relate both fact tables to it as many-to-one, and hide the raw many-to-many. DAX measures stay simple and USERELATIONSHIP becomes unnecessary.

Connectez-vous pour dire si ça a marché.

answered a month ago
6

Your CMD npm start runs in a shell that exits. Also you're missing EXPOSE and a proper working directory. Try:

WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
CMD ["node", "server.js"]

Exec form (["node", ...]) keeps the process as PID 1.

Connectez-vous pour dire si ça a marché.

answered a month ago

Sign in and verify your email to post an answer.