Skip to content
Merged
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
31 changes: 19 additions & 12 deletions make/terminal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,21 @@ FROM ubuntu:24.04
# Set environment variables
ENV CONDA_DIR=/opt/conda

# Install base tools and dependencies
RUN apt-get update && apt-get install -y \
openssh-server \
curl \
wget \
git \
vim \
build-essential \
python3 \
python3-pip \
python3-venv \
&& rm -rf /var/lib/apt/lists/*
# Install base tools and dependencies with retry mechanism and network optimization
RUN apt-get clean && \
apt-get update --fix-missing && \
apt-get install -y --no-install-recommends \
openssh-server \
curl \
wget \
git \
vim \
build-essential \
python3 \
python3-pip \
python3-venv \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean

# Create development user
ARG DEV_USER=linuxserver.io
Expand All @@ -36,6 +39,10 @@ RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-$(if [ "$TA
# Set conda permissions
RUN chown -R $DEV_USER:$DEV_USER $CONDA_DIR

# Add conda to PATH and initialize
ENV PATH="$CONDA_DIR/bin:$PATH"
RUN conda init

# Create .ssh directory
RUN mkdir -p /home/$DEV_USER/.ssh && \
chown $DEV_USER:$DEV_USER /home/$DEV_USER/.ssh && \
Expand Down
7 changes: 7 additions & 0 deletions make/terminal/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ else
echo "⚠️ Unable to connect to container via SSH"
fi

# Configure conda auto-activation for development user
echo "Configuring conda auto-activation for user $DEV_USER..."
echo 'export PATH="/opt/conda/bin:$PATH"' >> "$USER_HOME/.bashrc"
echo 'source /opt/conda/etc/profile.d/conda.sh' >> "$USER_HOME/.bashrc"
echo 'conda activate base' >> "$USER_HOME/.bashrc"
chown $DEV_USER:$DEV_USER "$USER_HOME/.bashrc"

# Configure SSH timeout settings
echo "Configuring SSH timeout settings (60 minutes)..."
cat >> /etc/ssh/sshd_config << 'SSHD_EOF'
Expand Down