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

Updated base.dockerfile for all architectures #11408

Merged
merged 3 commits into from
Oct 16, 2023
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
24 changes: 14 additions & 10 deletions docker/base.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:bionic
FROM ubuntu:jammy

ENV NODE_VERSION=16.20.0

Expand All @@ -11,29 +11,33 @@ RUN apt-get update && \
git \
git-lfs \
psmisc \
python2.7 \
python-pip \
python-sphinx
python3 \
python3-pip \
python3-sphinx

# add yarn ppa
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list

# install nodejs and yarn
RUN apt-get update && \
curl -sSO https://deb.nodesource.com/node_16.x/pool/main/n/nodejs/nodejs_$NODE_VERSION-1nodesource1_amd64.deb && \
dpkg -i ./nodejs_$NODE_VERSION-1nodesource1_amd64.deb && \
rm nodejs_$NODE_VERSION-1nodesource1_amd64.deb && \
ARCH=$(dpkg --print-architecture) && \
curl -sSO https://deb.nodesource.com/node_16.x/pool/main/n/nodejs/nodejs_$NODE_VERSION-1nodesource1_$ARCH.deb && \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

dpkg -i ./nodejs_$NODE_VERSION-1nodesource1_$ARCH.deb && \
rm nodejs_$NODE_VERSION-1nodesource1_$ARCH.deb && \
apt-get install yarn

RUN git lfs install

# Check if symbolic links exist before creating them
RUN if [ ! -f /usr/bin/python ]; then ln -s /usr/bin/python3 /usr/bin/python; fi \
&& if [ ! -f /usr/bin/pip ]; then ln -s /usr/bin/pip3 /usr/bin/pip; fi

# copy Kolibri source code into image
COPY . /kolibri

# do the time-consuming base install commands
RUN cd /kolibri \
&& pip install -r requirements/dev.txt \
&& pip install -r requirements/build.txt \
&& pip install -r requirements/test.txt \
&& pip3 install -r requirements/dev.txt \
&& pip3 install -r requirements/test.txt \
&& yarn install --network-timeout 100000
1 change: 0 additions & 1 deletion docker/demoserver.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ FROM learningequality/kolibribase

ENV KOLIBRI_RUN_MODE=demoserver
ENV KOLIBRI_PROVISIONDEVICE_FACILITY="Kolibri Demo"
ENV WHICH_PYTHON=python2

COPY docker/entrypoint.py /docker/entrypoint.py

Expand Down
2 changes: 1 addition & 1 deletion docker/entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
# - KOLIBRI_PROVISIONDEVICE_FACILITY if set, provision facility with this name
# - CHANNELS_TO_IMPORT if set, comma separated list of channel IDs to import
DEFAULT_ENVS = {
"WHICH_PYTHON": "python2", # or python3 if you prefer; Kolibri don't care
"WHICH_PYTHON": "python3", # or python3 if you prefer; Kolibri don't care
"KOLIBRI_HOME": "/kolibrihome",
"KOLIBRI_HTTP_PORT": "8080",
"KOLIBRI_LANG": "en",
Expand Down