Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolves Multiple Issues and Enhances Docker Setup #352

Merged
merged 5 commits into from
May 28, 2023
Merged
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
23 changes: 19 additions & 4 deletions .config/gitpod/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,20 @@ FROM ubuntu:jammy

USER root

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# Copy Python version config file
COPY .config/python_version.config /tmp/

# Set a variable for the npm version
ARG NPM_VERSION=9.6.7
# Set a variable for the ungit version
ARG UNGIT_VERSION=1.5.23

# Update system and install packages, including Docker
# Replace "python3.10" with "$(cat /tmp/python_version.txt)" in the apt-get install command
RUN PYTHON_VERSION=$(cat /tmp/python_version.config | cut -d '=' -f 2) && \
# Replace "python3.10" with "$(cut -d '=' -f 2 /tmp/python_version.config)" in the apt-get install command
# hadolint ignore=DL3008,DL3013
RUN PYTHON_VERSION=$(cut -d '=' -f 2 /tmp/python_version.config) && \
apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y --no-install-recommends \
Expand All @@ -23,9 +31,10 @@ RUN PYTHON_VERSION=$(cat /tmp/python_version.config | cut -d '=' -f 2) && \
make \
nano \
python3-pip \
python${PYTHON_VERSION} \
python${PYTHON_VERSION}-venv \
"python${PYTHON_VERSION}" \
"python${PYTHON_VERSION}-venv" \
sudo \
tree \
vim \
wget \
&& python3 -m pip install --no-cache-dir --upgrade pip \
Expand All @@ -36,6 +45,12 @@ RUN PYTHON_VERSION=$(cat /tmp/python_version.config | cut -d '=' -f 2) && \
$(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null \
&& apt-get update \
&& apt-get install -y --no-install-recommends docker-ce docker-ce-cli containerd.io \
# Install npm and ungit using the versions specified in the variables
&& curl -fsSL https://deb.nodesource.com/setup_20.x |bash - \
&& apt-get install -y --no-install-recommends nodejs \
&& npm install -g npm@${NPM_VERSION} \
&& npm install -g \
ungit@${UNGIT_VERSION} \
# Clean
&& apt-get clean && rm -rf /var/lib/apt/lists/* tmp/*

Expand Down