forked from HotNoob/PythonProtocolGateway
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (28 loc) · 951 Bytes
/
Dockerfile
File metadata and controls
36 lines (28 loc) · 951 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
36
FROM python:3.13-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
curl \
wget \
sudo \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Create vscode user
RUN groupadd --gid 1000 vscode \
&& useradd --uid 1000 --gid vscode --shell /bin/bash --create-home vscode \
&& echo vscode ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/vscode \
&& chmod 0440 /etc/sudoers.d/vscode
# Add vscode user to dialout group for serial port access
RUN usermod -a -G dialout vscode
# Set up working directory
WORKDIR /workspace
# Copy requirements first for better caching
COPY requirements.txt requirements-dev.txt ./
# Install Python dependencies
RUN pip install --upgrade pip \
&& pip install -r requirements.txt \
&& pip install -r requirements-dev.txt
# Switch to vscode user
USER vscode
# Set up shell
RUN echo 'export PATH="/home/vscode/.local/bin:$PATH"' >> /home/vscode/.bashrc