File size: 787 Bytes
8f9c4ef | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# Sandbox Dockerfile β Python execution
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
FROM python:3.12-alpine
# Create sandbox user
RUN adduser -D -u 1000 sandbox
# Install common Python packages
RUN pip install --no-cache-dir numpy pandas
# Create workspace
RUN mkdir -p /sandbox && chown sandbox:sandbox /sandbox
# Remove pip to prevent installs
RUN rm -rf /usr/local/bin/pip /usr/local/bin/pip3
USER sandbox
WORKDIR /sandbox
ENTRYPOINT ["sh", "-c"]
|