addyosmani-essential-js-design-patterns
SUCCESS
17m 54s
History Source
SummaryIterations1Transcript25Dockerfile
Dockerfile17 lines · 357 chars
FROM node:18-slim

WORKDIR /app

# Prepare a dist directory and copy the source (the book) into it
RUN mkdir -p dist
COPY book/ dist/

# Install a lightweight static server to serve the built site
RUN npm install -g http-server

# Expose port for the static server
EXPOSE 8080

# Serve the built dist directory
CMD ["sh", "-lc", "http-server dist -p 8080"]