21 lines
		
	
	
		
			456 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			456 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
| FROM docker.io/oven/bun as base
 | |
| 
 | |
| # install dependencies into temp directory
 | |
| FROM base AS install
 | |
| WORKDIR /modules
 | |
| COPY package.json bun.lockb /modules/
 | |
| RUN bun install --frozen-lockfile --production
 | |
| 
 | |
| 
 | |
| # copy production dependencies and source code into final image
 | |
| FROM base AS release
 | |
| WORKDIR /usr/src/app
 | |
| 
 | |
| COPY --from=install /modules/node_modules node_modules
 | |
| COPY  src .
 | |
| 
 | |
| # run the app
 | |
| USER bun
 | |
| EXPOSE 3000/tcp
 | |
| ENTRYPOINT [ "bun", "run", "index.tsx" ]
 |