mirror of
				https://github.com/karl0ss/homepage.git
				synced 2025-10-31 14:34:00 +00:00 
			
		
		
		
	Update Dockerfile for --link
This commit is contained in:
		
							parent
							
								
									a265038bf6
								
							
						
					
					
						commit
						78c52861c7
					
				
							
								
								
									
										18
									
								
								Dockerfile
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								Dockerfile
									
									
									
									
									
								
							| @ -5,12 +5,16 @@ FROM node:16-alpine AS deps | |||||||
| 
 | 
 | ||||||
| WORKDIR /app | WORKDIR /app | ||||||
| 
 | 
 | ||||||
| COPY package.json pnpm-lock.yaml* ./ | COPY --link package.json pnpm-lock.yaml* ./ | ||||||
| 
 | 
 | ||||||
| RUN <<EOF | RUN <<EOF | ||||||
|     set -xe |     set -xe | ||||||
|     apk add --no-cache libc6-compat |     apk add --no-cache libc6-compat | ||||||
|     apk add --no-cache --virtual .gyp python3 make g++ |     apk add --no-cache --virtual .gyp python3 make g++ | ||||||
|  | EOF | ||||||
|  | 
 | ||||||
|  | RUN <<EOF | ||||||
|  |     set -xe | ||||||
|     yarn global add pnpm |     yarn global add pnpm | ||||||
|     pnpm install |     pnpm install | ||||||
| EOF | EOF | ||||||
| @ -18,8 +22,10 @@ EOF | |||||||
| # Rebuild the source code only when needed | # Rebuild the source code only when needed | ||||||
| FROM node:16-alpine AS builder | FROM node:16-alpine AS builder | ||||||
| WORKDIR /app | WORKDIR /app | ||||||
| COPY --from=deps /app/node_modules ./node_modules | 
 | ||||||
|  | COPY --link --from=deps /app/node_modules ./node_modules/ | ||||||
| COPY . . | COPY . . | ||||||
|  | 
 | ||||||
| RUN <<EOF | RUN <<EOF | ||||||
|     set -xe |     set -xe | ||||||
|     yarn next telemetry disable |     yarn next telemetry disable | ||||||
| @ -39,10 +45,10 @@ ENV NODE_ENV production | |||||||
| 
 | 
 | ||||||
| WORKDIR /app | WORKDIR /app | ||||||
| 
 | 
 | ||||||
| COPY --from=builder /app/next.config.js /app/.next/standalone ./ | COPY --link --from=builder /app/next.config.js /app/.next/standalone ./ | ||||||
| COPY --from=builder /app/public ./public | COPY --link --from=builder /app/public ./public/ | ||||||
| COPY --from=builder /app/package.json ./package.json | COPY --link --from=builder /app/package.json ./package.json | ||||||
| COPY --from=builder /app/.next/static ./.next/static | COPY --link --from=builder /app/.next/static ./.next/static/ | ||||||
| 
 | 
 | ||||||
| EXPOSE 3000 | EXPOSE 3000 | ||||||
| ENV PORT 3000 | ENV PORT 3000 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Alex
						Alex