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
/
Dockerfile
63 lines (57 loc) · 1.98 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
ARG NODE_VERSION=12.18.3
FROM node:${NODE_VERSION}
RUN apt-get update && apt-get install -y libsecret-1-dev
ARG version=latest
WORKDIR /home/theia
ADD $version.package.json ./package.json
ARG GITHUB_TOKEN
RUN yarn --pure-lockfile && \
NODE_OPTIONS="--max_old_space_size=4096" yarn theia build && \
yarn theia download:plugins && \
yarn --production && \
yarn autoclean --init && \
echo *.ts >> .yarnclean && \
echo *.ts.map >> .yarnclean && \
echo *.spec.* >> .yarnclean && \
yarn autoclean --force && \
yarn cache clean
FROM node:${NODE_VERSION}
# Install Python 3 from source
ARG VERSION=3.8.3
RUN apt-get update \
&& 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/$VERSION/Python-$VERSION.tgz \
&& tar xvf Python-$VERSION.tgz \
&& cd Python-$VERSION \
&& ./configure \
&& make -j8 \
&& make install \
&& cd .. \
&& rm -rf Python-$VERSION \
&& rm Python-$VERSION.tgz
RUN apt-get update \
&& apt-get install -y libsecret-1-0 \
&& apt-get install -y python-dev python-pip \
&& pip install --upgrade pip --user \
&& apt-get install -y python3-dev python3-pip \
&& pip3 install --upgrade pip --user \
&& pip3 install python-language-server flake8 autopep8 \
&& apt-get install -y yarn \
&& apt-get clean \
&& apt-get auto-remove -y \
&& rm -rf /var/cache/apt/* \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/*
RUN mkdir -p /home/theia \
&& mkdir -p /home/project
ENV HOME /home/theia
WORKDIR /home/theia
COPY --from=0 /home/theia /home/theia
EXPOSE 3000
ENV SHELL=/bin/bash \
THEIA_DEFAULT_PLUGINS=local-dir:/home/theia/plugins
ENV USE_LOCAL_GIT true
ENTRYPOINT [ "node", "/home/theia/src-gen/backend/main.js", "/home/project", "--hostname=0.0.0.0" ]