This repository has been archived by the owner on Oct 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
python: update images to use vscode extensions
Fixes #74 - updates the `theia-python:latest` image to use builtin and vscode extensions. - updates the `theia-python:next` image to use builtin and vscode extensions. - updates the image to support both python 2 and 3. - includes the necessary tools for python development. Signed-off-by: vince-fugnitto <vincent.fugnitto@ericsson.com>
- Loading branch information
1 parent
9139e67
commit e50f8ea
Showing
3 changed files
with
172 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,40 @@ | ||
ARG NODE_VERSION=10 | ||
FROM node:${NODE_VERSION}-stretch | ||
FROM node:${NODE_VERSION} | ||
|
||
# Install Python 3 from source | ||
RUN apt-get update \ | ||
&& apt-get install -y python python-dev python-pip \ | ||
&& apt-get clean && rm -rf /var/cache/apt/* && rm -rf /var/lib/apt/lists/* && rm -rf /tmp/* | ||
&& apt-get upgrade -y \ | ||
&& apt-get install -y make build-essential libssl-dev \ | ||
&& apt-get install -y libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \ | ||
&& apt-get install -y libncurses5-dev libncursesw5-dev xz-utils tk-dev \ | ||
&& wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz \ | ||
&& tar xvf Python-3.7.0.tgz \ | ||
&& cd Python-3.7.0 \ | ||
&& ./configure \ | ||
&& make -j8 \ | ||
&& make install | ||
|
||
RUN pip install \ | ||
python-language-server \ | ||
flake8 \ | ||
autopep8 | ||
|
||
ARG version=latest | ||
RUN apt-get update \ | ||
&& apt-get install -y python-dev python-pip \ | ||
&& apt-get install -y python3-dev python3-pip \ | ||
&& pip install python-language-server flake8 autopep8 \ | ||
&& apt-get install -y yarn \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/cache/apt/* \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& rm -rf /tmp/* | ||
|
||
RUN mkdir -p /home/theia \ | ||
&& mkdir -p /home/project | ||
WORKDIR /home/theia | ||
|
||
ARG version=latest | ||
ADD $version.package.json ./package.json | ||
ARG GITHUB_TOKEN | ||
RUN yarn --cache-folder ./ycache && rm -rf ./ycache | ||
RUN yarn theia build | ||
RUN yarn --cache-folder ./ycache && rm -rf ./ycache && \ | ||
yarn theia build ; \ | ||
yarn theia download:plugins | ||
EXPOSE 3000 | ||
ENV SHELL /bin/bash | ||
ENV SHELL=/bin/bash \ | ||
THEIA_DEFAULT_PLUGINS=local-dir:/home/theia/plugins | ||
ENTRYPOINT [ "yarn", "theia", "start", "/home/project", "--hostname=0.0.0.0" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.