Skip to content
Snippets Groups Projects
Commit 9439e2a5 authored by Alex's avatar Alex
Browse files

init

parent 96cde418
No related branches found
No related tags found
No related merge requests found
Pipeline #14249 failed
{
"private": true,
"dependencies": {
"@theia/core": "1.20",
"@theia/callhierarchy": "1.20",
"@theia/file-search": "1.20",
"@theia/editor": "1.20",
"@theia/git": "1.20",
"@theia/markers": "1.20",
"@theia/editor-preview": "1.20",
"@theia/keymaps": "1.20",
"@theia/filesystem": "1.20",
"@theia/output": "1.20",
"@theia/plugin": "1.20",
"@theia/plugin-ext": "1.20",
"@theia/plugin-ext-vscode": "1.20",
"@theia/process": "1.20",
"@theia/scm": "1.20",
"@theia/task": "1.20",
"@theia/typehierarchy": "1.20",
"@theia/userstorage": "1.20",
"@theia/variable-resolver": "1.20",
"@theia/workspace": "1.20",
"@theia/monaco": "1.20",
"@theia/messages": "1.20",
"@theia/navigator": "1.20",
"@theia/outline-view": "1.20",
"@theia/preferences": "1.20",
"@theia/preview": "1.20",
"@theia/search-in-workspace": "1.20",
"@theia/terminal": "1.20",
"@theia/mini-browser": "1.20",
"@theia/vsx-registry": "1.20",
"@theia/console": "1.20"
},
"devDependencies": {
"@theia/cli": "1.20"
},
"scripts": {
"prepare": "yarn run clean && yarn build && yarn run download:plugins",
"clean": "theia clean",
"build": "theia build --mode development",
"start": "theia start --plugins=local-dir:plugins",
"download:plugins": "theia download:plugins"
},
"theiaPluginsDir": "plugins",
"theiaPlugins": {
"vscode-builtin-extensions-pack": "https://open-vsx.org/api/eclipse-theia/builtin-extension-pack/1.50.1/file/eclipse-theia.builtin-extension-pack-1.50.1.vsix",
"vscode-builtins-pack": "https://open-vsx.org/api/eclipse-theia/builtin-extension-pack/1.50.1/file/eclipse-theia.builtin-extension-pack-1.50.1.vsix",
"vscode.git": "https://open-vsx.org/api/vscode/git/1.52.1/file/vscode.git-1.52.1.vsix",
"vscode.markdown-language-features": "https://open-vsx.org/api/vscode/markdown-language-features/1.39.2/file/vscode.markdown-language-features-1.39.2.vsix",
"vscode.editorconfig": "https://github.com/theia-ide/editorconfig-vscode/releases/download/v0.14.4/EditorConfig-0.14.4.vsix",
"vscode-clangd": "https://open-vsx.org/api/llvm-vs-code-extensions/vscode-clangd/0.1.11/file/llvm-vs-code-extensions.vscode-clangd-0.1.11.vsix",
"cdt-gdb-vscode": "https://open-vsx.org/api/eclipse-cdt/cdt-gdb-vscode/0.0.92/file/eclipse-cdt.cdt-gdb-vscode-0.0.92.vsix",
"vscode-eslint": "https://github.com/theia-ide/vscode-eslint/releases/download/release%2F2.0.15/vscode-eslint-2.0.15.vsix",
"vscode-go": "https://open-vsx.org/api/golang/Go/0.16.2/file/golang.Go-0.16.2.vsix",
"vscode-java-debug": "https://github.com/microsoft/vscode-java-debug/releases/download/0.28.0/vscjava.vscode-java-debug-0.28.0.vsix",
"vscode-java-dependency-viewer": "https://github.com/microsoft/vscode-java-dependency/releases/download/0.18.8/vscjava.vscode-java-dependency-0.18.8.vsix",
"vscode-java-redhat": "https://github.com/redhat-developer/vscode-java/releases/download/v1.1.0/redhat.java-1.1.0.vsix",
"vscode-java-test": "https://github.com/microsoft/vscode-java-test/releases/download/0.33.0/vscjava.vscode-java-test-0.33.0.vsix",
"vscode-python": "https://open-vsx.org/api/ms-python/python/2020.8.105369/file/ms-python.python-2020.8.105369.vsix",
"vscode-ruby": "https://github.com/rubyide/vscode-ruby/releases/download/v0.25.0/ruby-0.25.0.vsix",
"plantuml": "https://open-vsx.org/api/jebbs/plantuml/2.14.0/file/jebbs.plantuml-2.14.0.vsix",
"yangster": "https://open-vsx.org/api/typefox/yang-vscode/2.0.3/file/typefox.yang-vscode-2.0.3.vsix"
},
"theiaPluginsExcludeIds": [
"vscode.extension-editing",
"vscode.github",
"vscode.microsoft-authentication"
]
}
FROM ubuntu:18.04 as common
ENV DEBIAN_FRONTEND noninteractive
ARG NODE_VERSION=12.18.3
ENV NODE_VERSION $NODE_VERSION
ENV YARN_VERSION 1.22.5
# Common deps
RUN apt-get update && \
apt-get -y install build-essential \
curl \
git \
gpg \
python \
wget \
xz-utils \
sudo \
libsecret-1-dev \
&& \
apt-get clean && \
apt-get autoremove -y && \
rm -rf /var/cache/apt/* && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /tmp/*
## User account
RUN adduser --disabled-password --gecos '' theia && \
adduser theia sudo && \
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
# Install node and yarn
# From: https://github.com/nodejs/docker-node/blob/6b8d86d6ad59e0d1e7a94cec2e909cad137a028f/8/Dockerfile
# gpg keys listed at https://github.com/nodejs/node#release-keys
RUN set -ex \
&& for key in \
4ED778F539E3634C779C87C6D7062848A1AB005C \
B9E2F5981AA6E0CD28160D9FF13993A75599653C \
94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \
B9AE9905FFD7803F25714661B63B535A4C206CA9 \
77984A986EBC2AA786BC0F66B01FBB92821C587A \
71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 \
FD3A5288F042B6850C66B31F09FE44734EB7990E \
8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \
C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \
DD8F2338BAE7501E3DD5AC78C273792F7D83545D \
A48C2BEE680E841632CD4E44F07496B3EB3C1762 \
; do \
gpg --batch --keyserver keyserver.ubuntu.com --recv-key "$key" || \
gpg --batch --keyserver keys.openpgp.org --recv-key "$key" || \
gpg --batch --keyserver pgp.mit.edu --recv-keys "$key" || \
gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" ; \
done
RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
&& case "${dpkgArch##*-}" in \
amd64) ARCH='x64';; \
ppc64el) ARCH='ppc64le';; \
s390x) ARCH='s390x';; \
arm64) ARCH='arm64';; \
armhf) ARCH='armv7l';; \
i386) ARCH='x86';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
&& curl -SLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
&& rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
RUN set -ex \
&& for key in \
6A010C5166006599AA17F08146C2130DFD2497F5 \
; do \
gpg --batch --keyserver keyserver.ubuntu.com --recv-key "$key" || \
gpg --batch --keyserver keys.openpgp.org --recv-key "$key" || \
gpg --batch --keyserver pgp.mit.edu --recv-key "$key" || \
gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" ; \
done \
&& curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
&& curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \
&& gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
&& mkdir -p /opt/yarn \
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/yarn --strip-components=1 \
&& ln -s /opt/yarn/bin/yarn /usr/local/bin/yarn \
&& ln -s /opt/yarn/bin/yarn /usr/local/bin/yarnpkg \
&& rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz
FROM common as theia
# Use "latest" or "next" version for Theia packages
ARG version=latest
# Optionally build a striped Theia application with no map file or .ts sources.
# Makes image ~150MB smaller when enabled
ARG strip=false
ENV strip=$strip
USER theia
WORKDIR /home/theia
ADD $version.package.json ./package.json
RUN ls
RUN if [ "$strip" = "true" ]; then \
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 \
;else \
yarn --cache-folder ./ycache && rm -rf ./ycache && \
NODE_OPTIONS="--max_old_space_size=4096" yarn theia build && yarn theia download:plugins \
;fi
FROM common
# Developer tools
# LSPs
## GO
# Fix from https://github.com/vince-fugnitto/theia-apps/pull/4
ENV GO_VERSION=1.17.3 \
GOOS=linux \
GOARCH=amd64 \
GOROOT=/usr/local/go \
GOPATH=/usr/local/go-packages
ENV PATH=$GOROOT/bin:$GOPATH/bin:$PATH
RUN curl -fsSL https://storage.googleapis.com/golang/go$GO_VERSION.linux-amd64.tar.gz | tar -C /usr/local -xzs
# install VS Code Go tools for use with gopls as per https://github.com/golang/vscode-go/blob/master/docs/tools.md
# also https://github.com/golang/vscode-go/blob/27bbf42a1523cadb19fad21e0f9d7c316b625684/src/goTools.ts#L139
RUN go get -v \
github.com/uudashr/gopkgs/cmd/gopkgs@v2 \
github.com/ramya-rao-a/go-outline \
github.com/cweill/gotests/gotests \
github.com/fatih/gomodifytags \
github.com/josharian/impl \
github.com/haya14busa/goplay/cmd/goplay \
github.com/go-delve/delve/cmd/dlv \
github.com/golangci/golangci-lint/cmd/golangci-lint && \
GO111MODULE=on go get -v \
golang.org/x/tools/gopls@v0.7.3
# Java
RUN apt-get update && apt-get -y install openjdk-11-jdk maven gradle
# Python 2-3
RUN apt-get update \
&& apt-get install -y software-properties-common \
&& add-apt-repository -y ppa:deadsnakes/ppa \
&& apt-get install -y python-dev python-pip \
&& apt-get install -y python3.8 python3-dev python3-pip \
&& apt-get remove -y software-properties-common \
&& python -m pip install --upgrade pip --user \
&& python3.8 -m pip install --upgrade pip --user \
&& pip3 install python-language-server flake8 autopep8
# .NET Core SDK
ARG DOTNET_VERSION=3.1
# Disables .NET telemetry
ENV DOTNET_CLI_TELEMETRY_OPTOUT 1
# Suppresses .NET welcome message
ENV DOTNET_SKIP_FIRST_TIME_EXPERIENCE 1
RUN curl -SLO "https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb" \
&& dpkg -i packages-microsoft-prod.deb \
&& rm packages-microsoft-prod.deb \
&& apt-get update \
&& apt-get install -y dotnet-sdk-$DOTNET_VERSION
WORKDIR /home/theia
COPY --from=theia --chown=theia:theia /home/theia /home/theia
RUN apt-get update && apt-get -y install libsecret-1-0
RUN chmod g+rw /home && \
mkdir -p /home/project && \
mkdir -p /home/theia/.pub-cache/bin && \
mkdir -p /usr/local/cargo && \
mkdir -p /usr/local/go && \
mkdir -p /usr/local/go-packages && \
chown -R theia:theia /home/project && \
chown -R theia:theia /home/theia/.pub-cache/bin && \
chown -R theia:theia /usr/local/cargo && \
chown -R theia:theia /usr/local/go && \
chown -R theia:theia /usr/local/go-packages
# Theia application
RUN apt-get clean && \
apt-get autoremove -y && \
rm -rf /var/cache/apt/* && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /tmp/*
# Change permissions to make the `yang-language-server` executable.
RUN chmod +x ./plugins/yangster/extension/server/bin/yang-language-server
USER theia
EXPOSE 3000
# Configure Theia
ENV SHELL=/bin/bash \
THEIA_DEFAULT_PLUGINS=local-dir:/home/theia/plugins \
# Configure user Go path
GOPATH=/home/project
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
RUN ls
ENTRYPOINT [ "node", "/home/theia/src-gen/backend/main.js", "/home/project", "--hostname=0.0.0.0", "--plugins=local-dir:./plugins" ]
\ No newline at end of file
# theia
Theia ne supporte plus les versions Docker (https://github.com/eclipse-theia/theia/issues/10261)
Nous maintenons une version précise avec les packages donc nous avons besoin sous $VERSION.package.json
Pour construire une image Docker de Theia : `./build.sh VERSION`
Ceci va prendre le fichier `VERSION.package.json` et construire une image theia:$VERSION
\ No newline at end of file
#!/bin/sh
set -e
TAG=${1:-latest}
docker build --build-arg "version=$TAG" . -t "theia:$TAG" --no-cache
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment