21 lines
		
	
	
		
			369 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			369 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
FROM node:20 as builder
 | 
						|
 | 
						|
WORKDIR /app
 | 
						|
 | 
						|
RUN npm install -g pnpm@8
 | 
						|
COPY . .
 | 
						|
RUN pnpm install && pnpm build
 | 
						|
 | 
						|
 | 
						|
# See https://lipanski.com/posts/smallest-docker-image-static-website
 | 
						|
FROM busybox:1.36
 | 
						|
 | 
						|
RUN adduser -D static
 | 
						|
USER static
 | 
						|
WORKDIR /home/static
 | 
						|
 | 
						|
COPY --from=builder /app/public .
 | 
						|
 | 
						|
# Run BusyBox httpd
 | 
						|
EXPOSE 3000
 | 
						|
CMD ["busybox", "httpd", "-f", "-v", "-p", "3000"] |