Jump to content

Dockerfile Expose Example Exclusive | 2024-2026 |

COPY . . EXPOSE 3000

COPY package*.json ./ RUN npm install

: EXPOSE is metadata. Always use -p or -P when running containers to actually access the ports! dockerfile expose example

FROM node:18-alpine WORKDIR /app

HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 CMD curl -f http://localhost:8000/health || exit 1 dockerfile expose example

COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt dockerfile expose example

×
×
  • Create New...