mirror of
				https://github.com/TeamPiped/piped-proxy.git
				synced 2024-08-14 23:50:45 +00:00 
			
		
		
		
	Merge 578bb48283 into 07e41e6b17
				
					
				
			This commit is contained in:
		
						commit
						ecf8f7cb90
					
				
					 1 changed files with 6 additions and 16 deletions
				
			
		
							
								
								
									
										22
									
								
								Dockerfile
									
										
									
									
									
								
							
							
						
						
									
										22
									
								
								Dockerfile
									
										
									
									
									
								
							| 
						 | 
					@ -1,29 +1,19 @@
 | 
				
			||||||
FROM rust:slim as BUILD
 | 
					FROM rust:alpine as BUILD
 | 
				
			||||||
 | 
					
 | 
				
			||||||
WORKDIR /app/
 | 
					RUN apk add --no-cache nasm git g++
 | 
				
			||||||
 | 
					
 | 
				
			||||||
COPY . .
 | 
					RUN git clone https://github.com/TeamPiped/piped-proxy.git /app
 | 
				
			||||||
 | 
					
 | 
				
			||||||
RUN --mount=type=cache,target=/var/cache/apt \
 | 
					WORKDIR /app
 | 
				
			||||||
    apt-get update && \
 | 
					 | 
				
			||||||
    apt-get install -y --no-install-recommends \
 | 
					 | 
				
			||||||
    nasm && \
 | 
					 | 
				
			||||||
    rm -rf /var/lib/apt/lists/*
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
RUN --mount=type=cache,target=/usr/local/cargo/registry \
 | 
					RUN --mount=type=cache,target=/usr/local/cargo/registry \
 | 
				
			||||||
    --mount=type=cache,target=/app/target/   \
 | 
					    --mount=type=cache,target=/app/target/   \
 | 
				
			||||||
    cargo build --release && \
 | 
					    cargo build --release && \
 | 
				
			||||||
    mv target/release/piped-proxy .
 | 
					    mv target/release/piped-proxy .
 | 
				
			||||||
 | 
					
 | 
				
			||||||
FROM debian:stable-slim
 | 
					FROM scratch
 | 
				
			||||||
 | 
					
 | 
				
			||||||
RUN --mount=type=cache,target=/var/cache/apt \
 | 
					WORKDIR /app
 | 
				
			||||||
    apt-get update && \
 | 
					 | 
				
			||||||
    apt-get install -y --no-install-recommends \
 | 
					 | 
				
			||||||
    ca-certificates && \
 | 
					 | 
				
			||||||
    rm -rf /var/lib/apt/lists/*
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
WORKDIR /app/
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
COPY --from=BUILD /app/piped-proxy .
 | 
					COPY --from=BUILD /app/piped-proxy .
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue