-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.python
More file actions
35 lines (27 loc) · 784 Bytes
/
Dockerfile.python
File metadata and controls
35 lines (27 loc) · 784 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FROM arm64v8/python:3.11-alpine
# Install system dependencies for WiFi management
RUN apk update && \
apk add --no-cache \
bridge \
hostapd \
wireless-tools \
wpa_supplicant \
dnsmasq \
iw
# Create app directory
WORKDIR /app
# Copy requirements and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Create wpa_supplicant directory and copy default config
RUN mkdir -p /etc/wpa_supplicant/
COPY ./dev/configs/wpa_supplicant.conf /etc/wpa_supplicant/wpa_supplicant.conf
# Copy application code
COPY *.py ./
COPY cfg/ ./cfg/
# Set executable permissions on main script
RUN chmod +x main.py
# Expose port
EXPOSE 8080
# Run the application
ENTRYPOINT ["python3", "main.py"]