Initial commit
This commit is contained in:
commit
94d8e201f5
10 changed files with 909 additions and 0 deletions
28
Dockerfile
Normal file
28
Dockerfile
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
FROM python:3.14-alpine
|
||||
|
||||
# Install system dependencies
|
||||
RUN apk add --no-cache \
|
||||
hostapd \
|
||||
sudo
|
||||
|
||||
# Create app directory
|
||||
WORKDIR /app
|
||||
|
||||
# Copy requirements and install Python dependencies
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Copy application code
|
||||
COPY . .
|
||||
|
||||
# Create non-root user for security
|
||||
RUN adduser -D -u 1000 appuser && \
|
||||
chown -R appuser:appuser /app && \
|
||||
echo "appuser ALL=(ALL) NOPASSWD: /usr/bin/hostapd_cli" >> /etc/sudoers
|
||||
USER appuser
|
||||
|
||||
# Expose port
|
||||
EXPOSE 5000
|
||||
|
||||
# Run application
|
||||
CMD ["python", "app.py"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue