Skip to content

Commit

Permalink
Merge pull request #40 from acend/dst/theia_blueprint
Browse files Browse the repository at this point in the history
update to build theia direct for latest versions and update purposes
  • Loading branch information
splattner authored Jan 30, 2022
2 parents 4b2e2de + 118d39c commit 3cb89e8
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 15 deletions.
62 changes: 49 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,43 @@
FROM quay.io/acend/theia-original
FROM node:12-alpine3.15

ARG ARGOCD_VERSION=2.1.2
ARG AZURECLI_VERSION=2.28.0
ARG DOCKER_COMPOSE=1.29.2
ARG HELM_VERSION=3.7.0
ARG KUBECTL_VERSION=1.22.2
RUN apk add --no-cache make pkgconfig gcc g++ python3 libx11-dev libxkbfile-dev libsecret-dev

WORKDIR /home/theia
ADD 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:12-alpine3.15

ARG ARGOCD_VERSION=2.2.2
ARG AZURECLI_VERSION=2.32.0
ARG DOCKER_COMPOSE=2.2.3
ARG HELM_VERSION=3.7.2
ARG KUBECTL_VERSION=1.23.2
ARG OC_VERSION=4.8
ARG TERRAFORM_VERSION=1.0.10
ARG TERRAFORM_VERSION=1.1.4
ARG TFENV_VERSION=v2.2.2
ARG KUSTOMIZE_VERSION=4.4.0
ARG KUSTOMIZE_VERSION=4.4.1
ARG MINIKUBE_VERSION=1.24.0

USER root
RUN sed -i "s/3.11/3.14/" /etc/apk/repositories && \
apk --no-cache update && \
RUN apk --no-cache update && \
apk --no-cache -U upgrade -a && \
apk --no-cache add coreutils grep bash curl gettext vim tree git p7zip gcompat \
apk add --no-cache git openssh-client-default bash libsecret \
zsh zsh-autosuggestions \
coreutils grep curl gettext vim tree git p7zip gcompat \
docker-cli mysql-client lynx bind-tools figlet jq \
bash-completion docker-bash-completion git-bash-completion \
py3-pip py3-yaml py3-pynacl py3-bcrypt py3-cryptography py3-psutil py3-wheel
py3-pip py3-yaml py3-pynacl py3-bcrypt py3-cryptography py3-psutil py3-wheel

RUN pip3 install azure-cli==${AZURECLI_VERSION} --no-cache-dir && \
# azure cli cleanup
Expand Down Expand Up @@ -52,6 +71,12 @@ RUN pip3 install azure-cli==${AZURECLI_VERSION} --no-cache-dir && \
curl -#L -o minikube "https://github.com/kubernetes/minikube/releases/download/v${MINIKUBE_VERSION}/minikube-linux-amd64" && \
install -t /usr/local/bin minikube && rm minikube

RUN addgroup theia && \
adduser -G theia -s /bin/sh -D theia && \
chmod g+rw /home && \
mkdir -p /home/project && \
chown -R theia:theia /home/theia && \
chown -R theia:theia /home/project

RUN git config --global advice.detachedHead false && \
# tfenv & terraform
Expand All @@ -60,5 +85,16 @@ RUN git config --global advice.detachedHead false && \
tfenv install ${TERRAFORM_VERSION} && \
tfenv use ${TERRAFORM_VERSION}

ENV HOME /home/theia
WORKDIR /home/theia

COPY --from=0 --chown=theia:theia /home/theia /home/theia
EXPOSE 3000

ENV SHELL=/bin/bash \
THEIA_DEFAULT_PLUGINS=local-dir:/home/theia/plugins
ENV USE_LOCAL_GIT true

USER theia
COPY bashrc /home/theia/.bashrc
ENTRYPOINT [ "node", "/home/theia/src-gen/backend/main.js", "/home/project", "--hostname=0.0.0.0" ]
4 changes: 2 additions & 2 deletions deploy/charts/webshell/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: webshell
description: A Helm chart to deploy a webshell environment
type: application
version: 0.1.21
appVersion: "0.1.21"
version: 0.2.0
appVersion: "0.2.0"
44 changes: 44 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"private": true,
"dependencies": {
"@theia/callhierarchy": "next",
"@theia/file-search": "next",
"@theia/git": "next",
"@theia/markers": "next",
"@theia/messages": "next",
"@theia/navigator": "next",
"@theia/outline-view": "next",
"@theia/plugin-ext-vscode": "next",
"@theia/preferences": "next",
"@theia/preview": "next",
"@theia/search-in-workspace": "next",
"@theia/terminal": "next",
"@theia/vsx-registry": "next"
},
"devDependencies": {
"@theia/cli": "next"
},
"scripts": {
"preinstall": "node-gyp install",
"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",
"terraform": "https://open-vsx.org/api/4ops/terraform/0.2.1/file/4ops.terraform-0.2.1.vsix",
"yaml.lint": "https://open-vsx.org/api/phil9909/ytt-lint/0.3.1/file/phil9909.ytt-lint-0.3.1.vsix",
"md.lint": "https://open-vsx.org/api/DavidAnson/vscode-markdownlint/0.45.0/file/DavidAnson.vscode-markdownlint-0.45.0.vsix"
},
"theiaPluginsExcludeIds": [
"vscode.extension-editing",
"vscode.git",
"vscode.git-ui",
"vscode.github",
"vscode.markdown-language-features",
"vscode.microsoft-authentication"
]
}

0 comments on commit 3cb89e8

Please sign in to comment.