mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 21:35:00 +00:00

This docker container provides isolation of source distribution builds, whether [intended to be helpful](https://pypi.org/project/nvidia-pyindex/) or other more or less malicious forms of host system modification. Fixes #194 --------- Co-authored-by: Zanie Blue <contact@zanie.dev>
24 lines
766 B
Docker
24 lines
766 B
Docker
# Provide isolation for source distribution builds
|
|
# https://moyix.blogspot.com/2022/09/someones-been-messing-with-my-subnormals.html
|
|
|
|
FROM ubuntu:22.04
|
|
# Feel free to add build dependencies you need
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends \
|
|
python3 \
|
|
python3-pip \
|
|
python3-venv \
|
|
build-essential \
|
|
make \
|
|
autoconf \
|
|
curl \
|
|
&& apt-get clean \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
|
ENV HOME="/root"
|
|
WORKDIR /app
|
|
RUN python3 -m venv $HOME/venv-docker
|
|
ENV VIRTUAL_ENV="$HOME/venv-docker"
|
|
ENV PATH="$HOME/.cargo/bin:$HOME/venv-docker/bin:$PATH"
|
|
COPY rust-toolchain.toml rust-toolchain.toml
|
|
RUN rustup show
|