-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainerfile
More file actions
33 lines (25 loc) · 1.12 KB
/
Copy pathContainerfile
File metadata and controls
33 lines (25 loc) · 1.12 KB
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
# Minimal Debian-slim image for Secure Boot ISO development
FROM python:3.13-slim AS base
# Install essential system packages
RUN apt-get update && \
apt-get install -y --no-install-recommends \
git bash binutils curl gpg tar vim less passwd xz-utils sudo locales lsb-release && \
sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen en_US.UTF-8 && \
update-locale LANG=en_US.UTF-8 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8
# Create non-root user for VS Code Dev Container
RUN useradd -s /bin/bash -m vscode && echo "vscode ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
# Set up working environment
WORKDIR /workspace
# Add local bin to PATH
ENV PATH="/home/vscode/.local/bin:${PATH}" PYTHONPATH="/usr/lib/python3/dist-packages:${PYTHONPATH:+:$PYTHONPATH}"
# Switch to non-root user
USER vscode
RUN --mount=type=bind,source=pyproject.toml,target=/tmp/pyproject.toml \
pip install "pip-tools==7.5.3" && \
pip-compile --extra dev -o /tmp/requirements.txt /tmp/pyproject.toml && \
pip install -r /tmp/requirements.txt
CMD ["bash"]