from buster

This commit is contained in:
2021-11-15 12:24:39 +00:00
parent 56a8997fee
commit edf4429dd7
2 changed files with 80 additions and 10 deletions

View File

@@ -1,19 +1,70 @@
from theiaide/theia-python:latest
ARG NODE_VERSION=17.1.0-buster-slim
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 -y install libgs-dev \
&& rm -rf /var/lib/apt/lists/*
&& 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 \
&& pip3 install pytest pylint bandit black pytest-django six pytest-mock
&& 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/*
# Install docker for the container to enable access to a docker host if socket is mounted
RUN wget https://download.docker.com/linux/static/stable/x86_64/docker-20.10.9.tgz \
&& tar -xvf docker-20.10.9.tgz docker/docker && cp docker/docker /usr/bin/
# Install Python requirements to support development
COPY ./config/requirements.txt .
run pip3 install --upgrade pip \
&& pip3 install -r requirements.txt \
&& pip3 install pytest pylint bandit flake8 black pytest-django six pytest-mock
#ENTRYPOINT node /home/theia/src-gen/backend/main.js /home/project/ --hostname=0.0.0.0
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" ]

19
archive/Dockerfile Normal file
View File

@@ -0,0 +1,19 @@
from theiaide/theia-python:latest
RUN apt-get update \
&& apt-get -y install libgs-dev \
&& rm -rf /var/lib/apt/lists/*
# Install docker for the container to enable access to a docker host if socket is mounted
RUN wget https://download.docker.com/linux/static/stable/x86_64/docker-20.10.9.tgz \
&& tar -xvf docker-20.10.9.tgz docker/docker && cp docker/docker /usr/bin/
# Install Python requirements to support development
COPY ./config/requirements.txt .
run pip3 install --upgrade pip \
&& pip3 install -r requirements.txt \
&& pip3 install pytest pylint bandit flake8 black pytest-django six pytest-mock
#ENTRYPOINT node /home/theia/src-gen/backend/main.js /home/project/ --hostname=0.0.0.0