@@ -47,15 +47,11 @@ RUN /usr/local/bin/python3.12 -m venv /tmp/venv-template && \
4747 requests setuptools pandas matplotlib pyjwt pytest pytest-cov \
4848 azure.storage.blob azure.identity jupyter ipykernel notebook
4949
50- # Configure shell to auto-activate virtual environment
51- RUN echo "# Auto-activate APIM Samples virtual environment" >> ~/.bashrc && \
52- echo "if [ -f /workspaces/Apim-Samples/.venv/bin/activate ]; then" >> ~/.bashrc && \
53- echo " source /workspaces/Apim-Samples/.venv/bin/activate" >> ~/.bashrc && \
54- echo "fi" >> ~/.bashrc && \
55- echo "# Auto-activate APIM Samples virtual environment" >> ~/.zshrc && \
56- echo "if [ -f /workspaces/Apim-Samples/.venv/bin/activate ]; then" >> ~/.zshrc && \
57- echo " source /workspaces/Apim-Samples/.venv/bin/activate" >> ~/.zshrc && \
58- echo "fi" >> ~/.zshrc && \
50+ # Configure shell environment and helpful aliases (without auto-activating venv)
51+ RUN echo "# Add user local bin to PATH for Jupyter and other tools" >> ~/.bashrc && \
52+ echo "export PATH=\$ PATH:/home/vscode/.local/bin" >> ~/.bashrc && \
53+ echo "# Add user local bin to PATH for Jupyter and other tools" >> ~/.zshrc && \
54+ echo "export PATH=\$ PATH:/home/vscode/.local/bin" >> ~/.zshrc && \
5955 # Add helpful aliases
6056 echo "alias ll='ls -alF'" >> ~/.bashrc && \
6157 echo "alias la='ls -A'" >> ~/.bashrc && \
@@ -72,7 +68,8 @@ HEALTHCHECK --interval=60s --timeout=5s --start-period=10s --retries=2 \
7268# Add labels for maintainability
7369LABEL maintainer="APIM Samples Team" \
7470 description="Optimized dev container for Azure API Management samples with Codespaces prebuild support" \
75- version="2.2 " \
71+ version="2.3 " \
7672 python.version="3.12" \
7773 debian.version="bookworm" \
78- venv.location="/workspaces/Apim-Samples/.venv"
74+ venv.location="/workspaces/Apim-Samples/.venv" \
75+ note="VS Code Python extension handles venv activation to avoid duplicate prompts"
0 commit comments