11ARG PYTHON_VERSION_SHORT
22ARG PYTHON_VERSION
3- ARG REPO_OWNER=python-mode
4- FROM ghcr.io/${REPO_OWNER}/python-mode-base:${PYTHON_VERSION_SHORT}-latest
3+ # Use official Python slim image instead of non-existent base
4+ # Note: For Python 3.13, use 3.13.0 if just "3.13" doesn't work
5+ FROM python:${PYTHON_VERSION}-slim
56
67ENV PYTHON_VERSION=${PYTHON_VERSION}
78ENV PYTHONUNBUFFERED=1
89ENV PYMODE_DIR="/workspace/python-mode"
910
11+ # Install system dependencies required for testing
12+ RUN apt-get update && apt-get install -y \
13+ vim-nox \
14+ git \
15+ curl \
16+ bash \
17+ && rm -rf /var/lib/apt/lists/*
18+
1019# Set up working directory
1120WORKDIR /workspace
1221
@@ -23,18 +32,13 @@ RUN mkdir -p /root/.vim/pack/foo/start/ && \
2332# Initialize git submodules
2433WORKDIR /workspace/python-mode
2534
26- # Create a script to run tests
35+ # Create a simplified script to run tests (no pyenv needed with official Python image)
2736RUN echo '#!/bin/bash\n \
28- # export PYENV_ROOT="/opt/pyenv"\n \
29- # export PATH="${PYENV_ROOT}/bin:${PYENV_ROOT}/shims:${PATH}"\n \
30- eval "$(pyenv init -)"\n \
31- eval "$(pyenv init --path)"\n \
32- # Use specified Python version\n \
33- pyenv shell ${PYTHON_VERSION}\n \
3437cd /workspace/python-mode\n \
35- echo "Using Python: $(python --version)"\n \
38+ echo "Using Python: $(python3 --version)"\n \
39+ echo "Using Vim: $(vim --version | head -1)"\n \
3640bash ./tests/test.sh\n \
37- rm -f tests/.swo tests/.swp 2>&1 >/dev/null \n \
41+ rm -f tests/.swo tests/.swp 2>&1 >/dev/null\n \
3842' > /usr/local/bin/run-tests && \
3943 chmod +x /usr/local/bin/run-tests
4044
0 commit comments