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"]