BlueMoonBot commited on
Commit
2ad6ff1
·
verified ·
1 Parent(s): 475a3a3

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +28 -0
Dockerfile ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Step 1: Use an official lightweight Python image
2
+ FROM python:3.11-slim
3
+
4
+ # Step 2: Install required system utilities
5
+ RUN apt-get update && apt-get install -y \
6
+ wget \
7
+ tar \
8
+ git \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ # Step 3: Set up the working directory inside the container
12
+ WORKDIR /app
13
+
14
+ # Step 4: Download and extract Stockfish 18 safely
15
+ # This extracts it into a dedicated folder and skips the broken renaming command completely
16
+ RUN mkdir -p engines && \
17
+ wget https://github.com/official-stockfish/Stockfish/releases/download/sf_18/stockfish-ubuntu-x86-64-avx2.tar && \
18
+ tar -xf stockfish-ubuntu-x86-64-avx2.tar -C engines && \
19
+ rm -rf stockfish-ubuntu-x86-64-avx2.tar
20
+
21
+ # Step 5: Copy all your repository files into the container
22
+ COPY . /app
23
+
24
+ # Step 6: Install the Python requirements
25
+ RUN pip install --no-cache-dir -r requirements.txt
26
+
27
+ # Step 7: Command to start your Lichess bot
28
+ CMD ["python", "lichess-bot-master/lichess-bot.py"]