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
Changes from 1 commit
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
25 changes: 16 additions & 9 deletions docker/base.dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
FROM ubuntu:bionic
bjester marked this conversation as resolved.
Show resolved Hide resolved

ENV NODE_VERSION=16.20.0
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8

# install required packages
RUN apt-get update && \
Expand All @@ -11,29 +13,34 @@ 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/build.txt \
&& pip3 install -r requirements/test.txt \
&& yarn install --network-timeout 100000