setup ConanProfiles + reduce layers
This commit is contained in:
@@ -1,17 +1,28 @@
|
||||
FROM ubuntu:24.04
|
||||
|
||||
ENV TZ=Europe/Paris
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV PATH="/root/.local/bin:$PATH"
|
||||
# Set timezone, noninteractive mode, and pipx path
|
||||
ENV TZ=Europe/Paris \
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
PATH="/root/.local/bin:$PATH"
|
||||
|
||||
# Use build cache for ccache
|
||||
RUN --mount=type=cache,target=/ccache
|
||||
|
||||
# Make sudo dummy replacement, so we don't weaken docker security
|
||||
RUN echo "#!/bin/bash\n\$@" > /usr/bin/sudo
|
||||
RUN chmod +x /usr/bin/sudo
|
||||
# Dummy sudo (no security weakening)
|
||||
RUN echo '#!/bin/bash\n$@' > /usr/bin/sudo \
|
||||
&& chmod +x /usr/bin/sudo
|
||||
|
||||
RUN apt-get update -y
|
||||
RUN apt-get install -y
|
||||
# Install base dependencies in one layer
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
unzip \
|
||||
curl \
|
||||
wget \
|
||||
lsb-release \
|
||||
software-properties-common \
|
||||
gnupg \
|
||||
python3 \
|
||||
python3-pip \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN apt-get install unzip curl wget lsb-release software-properties-common gnupg -y
|
||||
RUN apt-get install python3 -y
|
||||
# Optional: Upgrade pip for Python3
|
||||
RUN python3 -m pip install --no-cache-dir --upgrade pip
|
||||
|
||||
Reference in New Issue
Block a user