Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"customizations": {
"vscode": {
"settings": {
"python.defaultInterpreterPath": "/usr/bin/python3",
"python.defaultInterpreterPath": "/usr/local/bin/python3",
"terminal.integrated.defaultProfile.linux": "bash",
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
Expand Down
50 changes: 37 additions & 13 deletions installers/Dockerfile.linux
Original file line number Diff line number Diff line change
@@ -1,29 +1,53 @@
FROM mcr.microsoft.com/azurelinux/base/python:3
FROM mcr.microsoft.com/azurelinux/base/core:3.0

ARG PYTHON_VERSION=stable
Comment thread
LiliDeng marked this conversation as resolved.

WORKDIR /app

RUN tdnf update -y && \
tdnf install -y \
git \
wget \
tar \
gcc \
gobject-introspection-devel \
cairo-gobject \
cairo-devel \
pkg-config \
gcc-c++ \
make \
binutils \
glibc-devel \
ca-certificates \
openssl-devel \
sqlite-devel \
zlib-devel \
xz \
xz-devel \
gawk \
bzip2-devel \
libffi-devel \
readline-devel \
libvirt-devel \
python3-devel \
python3-pip \
python3-virtualenv \
build-essential \
cairo-gobject-devel \
curl \
wget \
tar \
azure-cli \
ca-certificates && \
kernel-headers && \
tdnf clean all && \
rm -rf /var/cache/tdnf /tmp/*

RUN wget "https://aka.ms/lisa-python" -O "Python-${PYTHON_VERSION}.tar.xz" && \
tar -xJf "Python-${PYTHON_VERSION}.tar.xz" && \
PYTHON_SOURCE_DIR="$(find /app -maxdepth 1 -type d -name 'Python-*' -print -quit)" && \
test -n "${PYTHON_SOURCE_DIR}" && \
cd "${PYTHON_SOURCE_DIR}" && \
./configure --prefix=/opt/python --enable-optimizations --with-ensurepip=install && \
make -j "$(nproc)" && \
PYTHON_RELEASE_VERSION="$(./python -c 'import sys; print(".".join(map(str, sys.version_info[:3])))')" && \
make altinstall && \
ln -sf "/opt/python/bin/python${PYTHON_RELEASE_VERSION%.*}" /usr/local/bin/python3 && \
Comment thread
LiliDeng marked this conversation as resolved.
ln -sf "/opt/python/bin/pip${PYTHON_RELEASE_VERSION%.*}" /usr/local/bin/pip3 && \
python3 --version | grep -Fx "Python ${PYTHON_RELEASE_VERSION}" && \
cd /app && \
rm -rf "${PYTHON_SOURCE_DIR}" "Python-${PYTHON_VERSION}.tar.xz"

ENV PATH="/opt/python/bin:${PATH}"

RUN wget https://aka.ms/downloadazcopy-v10-linux -O azcopy.tar.gz && \
tar -xvf azcopy.tar.gz && \
mv azcopy*/azcopy /usr/local/bin/ && \
Expand Down
4 changes: 1 addition & 3 deletions installers/Dockerfile.windows
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ SHELL ["powershell", "-Command"]

WORKDIR C:\\app\\

ENV PYTHON_VERSION=3.12.9

RUN Invoke-WebRequest -Uri "https://www.python.org/ftp/python/$Env:PYTHON_VERSION/python-$Env:PYTHON_VERSION-amd64.exe" -OutFile "C:\\python-installer.exe" -UseBasicParsing; \
RUN Invoke-WebRequest -Uri "https://aka.ms/lisa-python-windows" -OutFile "C:\\python-installer.exe" -UseBasicParsing; \
$gitRelease = Invoke-RestMethod -Uri "https://api.github.com/repos/git-for-windows/git/releases/latest" -Headers @{ 'User-Agent' = 'Docker Build' }; \
$gitInstallerUrl = $gitRelease.assets | Where-Object { $_.name -like '*64-bit.exe' } | Select-Object -ExpandProperty browser_download_url; \
Invoke-WebRequest -Uri $gitInstallerUrl -OutFile "C:\\git-installer.exe" -UseBasicParsing;
Expand Down
Loading