17 lines
		
	
	
		
			436 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			436 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
# Build the execuitible 
 | 
						|
FROM rustlang/rust:nightly as builder
 | 
						|
ENV RUSTFLAGS="--release"
 | 
						|
 | 
						|
WORKDIR /bot
 | 
						|
# RUN apt-get update && apt-get upgrade -y 
 | 
						|
COPY . .
 | 
						|
RUN cargo build --release
 | 
						|
 | 
						|
# Now make the runtime container
 | 
						|
FROM debian:bookworm-slim
 | 
						|
 | 
						|
RUN apt-get update && apt-get upgrade -y && apt-get clean
 | 
						|
COPY --from=builder /bot/target/release/${REPO-NAME} /usr/local/bin/${REPO-NAME}
 | 
						|
COPY Cargo.lock /
 | 
						|
 | 
						|
CMD ["/usr/local/bin/${REPO-NAME}"] |