remowe aws and closure workspaces from release 3.0

This commit is contained in:
bluxmit 2022-07-24 09:41:47 +00:00
parent 137da0b270
commit ce8d1bf270
10 changed files with 7 additions and 570 deletions

View file

@ -1,12 +0,0 @@
# Jupyterlite workspace
__WIP__
Planned features:
- [jupyterlite](https://jupyterlite.readthedocs.io/en/latest/)
- [GitHub](https://github.com/jupyterlite/jupyterlite)
- [sqlite kernel](https://github.com/jupyterlite/xeus-sqlite-kernel)
- [lua kernel](https://github.com/jupyterlite/xeus-lua-kernel)
- [p5.js kernel](https://github.com/jupyterlite/p5-kernel)
- [Javascript Kernels](https://github.com/deathbeds/jyve)

View file

@ -1,121 +0,0 @@
{
"private": true,
"theia": {
"frontend": {
"config": {
"applicationName": "Theia IDE",
"warnOnPotentiallyInsecureHostPattern": false,
"preferences": {
"files.enableTrash": false
}
}
}
},
"dependencies": {
"@theia/editor-preview": "1.15.0",
"@theia/file-search": "1.15.0",
"@theia/getting-started": "1.15.0",
"@theia/git": "1.15.0",
"@theia/markers": "1.15.0",
"@theia/messages": "1.15.0",
"@theia/monaco": "1.15.0",
"@theia/navigator": "1.15.0",
"@theia/outline-view": "1.15.0",
"@theia/plugin-ext-vscode": "1.15.0",
"@theia/preferences": "1.15.0",
"@theia/preview": "1.15.0",
"@theia/search-in-workspace": "1.15.0",
"@theia/terminal": "1.15.0",
"@theia/vsx-registry": "1.15.0"
},
"devDependencies": {
"@theia/cli": "1.15.0"
},
"scripts": {
"preinstall": "node-gyp install"
},
"theiaPluginsDir": "plugins",
"theiaPlugins": {
"vscode-builtin-bat": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/bat-1.39.1-prel.vsix",
"vscode-builtin-clojure": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/clojure-1.39.1-prel.vsix",
"vscode-builtin-coffeescript": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/coffeescript-1.39.1-prel.vsix",
"vscode-builtin-configuration-editing": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/configuration-editing-1.39.1-prel.vsix",
"vscode-builtin-cpp": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/cpp-1.39.1-prel.vsix",
"vscode-builtin-csharp": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/csharp-1.39.1-prel.vsix",
"vscode-builtin-css": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/css-1.39.1-prel.vsix",
"vscode-builtin-debug-auto-launch": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/debug-auto-launch-1.39.1-prel.vsix",
"vscode-builtin-docker": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/docker-1.39.1-prel.vsix",
"vscode-builtin-emmet": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/emmet-1.39.1-prel.vsix",
"vscode-builtin-fsharp": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/fsharp-1.39.1-prel.vsix",
"vscode-builtin-go": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/go-1.39.1-prel.vsix",
"vscode-builtin-groovy": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/groovy-1.39.1-prel.vsix",
"vscode-builtin-grunt": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/grunt-1.39.1-prel.vsix",
"vscode-builtin-gulp": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/gulp-1.39.1-prel.vsix",
"vscode-builtin-handlebars": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/handlebars-1.39.1-prel.vsix",
"vscode-builtin-hlsl": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/hlsl-1.39.1-prel.vsix",
"vscode-builtin-html": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/html-1.39.1-prel.vsix",
"vscode-builtin-html-language-features": "https://open-vsx.org/api/vscode/html-language-features/1.49.0/file/vscode.html-language-features-1.49.0.vsix",
"vscode-builtin-ini": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/ini-1.39.1-prel.vsix",
"vscode-builtin-jake": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/jake-1.39.1-prel.vsix",
"vscode-builtin-java": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/java-1.39.1-prel.vsix",
"vscode-builtin-javascript": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/javascript-1.39.1-prel.vsix",
"vscode-builtin-json": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/json-1.39.1-prel.vsix",
"vscode-builtin-json-language-features": "https://open-vsx.org/api/vscode/json-language-features/1.46.1/file/vscode.json-language-features-1.46.1.vsix",
"vscode-builtin-less": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/less-1.39.1-prel.vsix",
"vscode-builtin-log": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/log-1.39.1-prel.vsix",
"vscode-builtin-lua": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/lua-1.39.1-prel.vsix",
"vscode-builtin-make": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/make-1.39.1-prel.vsix",
"vscode-builtin-markdown": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/markdown-1.39.1-prel.vsix",
"vscode-builtin-merge-conflicts": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/merge-conflict-1.39.1-prel.vsix",
"vscode-builtin-npm": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/npm-1.39.1-prel.vsix",
"vscode-builtin-node-debug": "https://github.com/theia-ide/vscode-node-debug/releases/download/v1.35.3/node-debug-1.35.3.vsix",
"vscode-builtin-node-debug2": "https://github.com/theia-ide/vscode-node-debug2/releases/download/v1.33.0/node-debug2-1.33.0.vsix",
"vscode-builtin-objective-c": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/objective-c-1.39.1-prel.vsix",
"vscode-builtin-perl": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/perl-1.39.1-prel.vsix",
"vscode-builtin-powershell": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/powershell-1.39.1-prel.vsix",
"vscode-builtin-pug": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/pug-1.39.1-prel.vsix",
"vscode-builtin-python": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/python-1.39.1-prel.vsix",
"vscode-builtin-r": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/r-1.39.1-prel.vsix",
"vscode-builtin-razor": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/razor-1.39.1-prel.vsix",
"vscode-builtin-ruby": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/ruby-1.39.1-prel.vsix",
"vscode-builtin-rust": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/rust-1.39.1-prel.vsix",
"vscode-builtin-scss": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/scss-1.39.1-prel.vsix",
"vscode-builtin-shaderlab": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/shaderlab-1.39.1-prel.vsix",
"vscode-builtin-shellscript": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/shellscript-1.39.1-prel.vsix",
"vscode-builtin-sql": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/sql-1.39.1-prel.vsix",
"vscode-builtin-swift": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/swift-1.39.1-prel.vsix",
"vscode-builtin-theme-abyss": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-abyss-1.39.1-prel.vsix",
"vscode-builtin-theme-defaults": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-defaults-1.39.1-prel.vsix",
"vscode-builtin-theme-kimbie-dark": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-kimbie-dark-1.39.1-prel.vsix",
"vscode-builtin-theme-monokai": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-monokai-1.39.1-prel.vsix",
"vscode-builtin-theme-dimmed": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-monokai-dimmed-1.39.1-prel.vsix",
"vscode-builtin-theme-quietlight": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-quietlight-1.39.1-prel.vsix",
"vscode-builtin-theme-red": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-red-1.39.1-prel.vsix",
"vscode-builtin-theme-solarized-dark": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-solarized-dark-1.39.1-prel.vsix",
"vscode-builtin-theme-tomorrow-night-blue": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-tomorrow-night-blue-1.39.1-prel.vsix",
"vscode-builtin-typescript": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/typescript-1.39.1-prel.vsix",
"vscode-builtin-typescript-language-features": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/typescript-language-features-1.39.1-prel.vsix",
"vscode-builtin-vb": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/vb-1.39.1-prel.vsix",
"vscode-builtin-icon-theme-seti": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/vscode-theme-seti-1.39.1-prel.vsix",
"vscode-builtin-xml": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/xml-1.39.1-prel.vsix",
"vscode-builtin-yaml": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/yaml-1.39.1-prel.vsix",
"vscode-editorconfig": "https://github.com/theia-ide/editorconfig-vscode/releases/download/v0.14.4/EditorConfig-0.14.4.vsix",
"vscode-python": "https://github.com/microsoft/vscode-python/releases/download/2020.1.58038/ms-python-release.vsix",
"nadim-vscode.infinity-dark-theme": "https://open-vsx.org/api/nadim-vscode/infinity-dark-theme/1.0.1/file/nadim-vscode.infinity-dark-theme-1.0.1.vsix",
"emroussel.atomize-atom-one-dark-theme": "https://open-vsx.org/api/emroussel/atomize-atom-one-dark-theme/1.5.5/file/emroussel.atomize-atom-one-dark-theme-1.5.5.vsix",
"mhutchie.git-graph": "https://open-vsx.org/api/mhutchie/git-graph/1.30.0/file/mhutchie.git-graph-1.30.0.vsix",
"teabyii.ayu": "https://open-vsx.org/api/teabyii/ayu/0.20.1/file/teabyii.ayu-0.20.1.vsix",
"yurihs.sublime-vscode-theme": "https://open-vsx.org/api/yurihs/sublime-vscode-theme/1.4.1/file/yurihs.sublime-vscode-theme-1.4.1.vsix",
"wesbos.theme-cobalt2": "https://open-vsx.org/api/wesbos/theme-cobalt2/2.1.6/file/wesbos.theme-cobalt2-2.1.6.vsix",
"robbowen.synthwave-vscode": "https://open-vsx.org/api/RobbOwen/synthwave-vscode/0.1.8/file/RobbOwen.synthwave-vscode-0.1.8.vsix",
"4ops.terraform": "https://open-vsx.org/api/4ops/terraform/0.2.1/file/4ops.terraform-0.2.1.vsix",
"samuelcolvin.jinjahtml": "https://open-vsx.org/api/samuelcolvin/jinjahtml/0.16.0/file/samuelcolvin.jinjahtml-0.16.0.vsix",
"amazonwebservices.aws-toolkit-vscode": "https://open-vsx.org/api/amazonwebservices/aws-toolkit-vscode/1.38.0/file/amazonwebservices.aws-toolkit-vscode-1.38.0.vsix",
"sebastianbille.iam-legend": "https://open-vsx.org/api/sebastianbille/iam-legend/1.1.0/file/sebastianbille.iam-legend-1.1.0.vsix",
"dsteenman.cloudformation-yaml-snippets": "https://open-vsx.org/api/dsteenman/cloudformation-yaml-snippets/3.57.0/file/dsteenman.cloudformation-yaml-snippets-3.57.0.vsix"
}
}

View file

@ -1,28 +0,0 @@
ARG docker_registry=docker.io/alnoda
ARG image_tag=2.2
## Images used:
# ARG BUILD_IMAGE=node:12.18.3
ARG DEPLOY_IMAGE=${docker_registry}/ansible-terraform-workspace:${image_tag}
# Theia rebuild here
FROM ${DEPLOY_IMAGE}
USER root
RUN echo "------------------------------------------------------ AWS CLI" \
&& curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "/tmp/awscliv2.zip" \
&& cd /tmp && unzip /tmp/awscliv2.zip \
&& sh /tmp/aws/install \
&& rm /tmp/awscliv2.zip \
&& rm -r /tmp/aws \
&& echo "------------------------------------------------------ Pipx" \
&& python3 -m pip install --user pipx \
&& echo "------------------------------------------------------ Saws" \
&& pipx install saws
&& echo "------------------------------------------------------ Infra-graph" \
&& pipx install aws-infra-graph
USER abc
COPY settings.json /home/abc/.theia/settings.json

View file

@ -1,30 +0,0 @@
# AWS Workspace
__WIP__
## Infra viz
- https://github.com/duo-labs/cloudmapper
- https://github.com/ludwigm/infrastructure-graph
- https://github.com/prparikh02/aws-vpc-visualizer
- https://github.com/kotlarz/infrastructure-diagrams
- https://github.com/Cloud-Architects/cloudiscovery
## VS-code extensions
- https://open-vsx.org/extension/amazonwebservices/aws-toolkit-vscode
## Security
- https://github.com/prowler-cloud/prowler
- https://github.com/salesforce/cloudsplaining
- https://github.com/anaynayak/aws-security-viz
## Other (special)
- https://github.com/dbcli/athenacli
- https://github.com/aws/aws-sam-cli
- https://github.com/barnybug/cli53

View file

@ -1,70 +0,0 @@
# ===========================================================
# NAVIGATION
# ===========================================================
nav:
- Home: README.md
- My apps: pages/my-apps.md
- Docs: https://docs.alnoda.org/aws-workspace/
# ===========================================================
# CONFIGURATION
# ===========================================================
site_name: AWS workspace
repo_url: https://github.com/bluxmit/alnoda-workspaces
site_url: https://docs.alnoda.org
edit_uri: ""
# ===========================================================
# APPEARANCE
# ===========================================================
theme:
name: 'material'
favicon: 'assets/favicon.ico'
logo: 'assets/Alnoda-logo.svg'
custom_dir: overrides
icon:
repo: fontawesome/brands/git-alt
features:
- navigation.instant
palette:
- scheme: default
toggle:
icon: material/toggle-switch-off-outline
name: Switch to light mode
primary: orange
accent: deep orange
- scheme: slate
toggle:
icon: material/toggle-switch
name: Switch to dark mode
primary: orange
accent: deep orange
extra:
# Link to open when your logo is clicked
homepage: https://docs.alnoda.org
host_url: http://docs.alnoda.org
plugins:
- search
# Enable Macros and jinja2 templates
- macros:
module_name: macros/helpers
extra_javascript:
- javascripts/config.js
- https://polyfill.io/v3/polyfill.min.js?features=es6

View file

@ -1,5 +0,0 @@
{
"terminal.integrated.shell.linux": "/bin/zsh",
"workbench.colorTheme": "Infinity Dark Theme Eye Friendly Colors",
"git-graph.maxDepthOfRepoSearch": 3
}

View file

@ -1,5 +0,0 @@
# Closure workspace
__WIP__
https://github.com/nextjournal/clerk

View file

@ -6,7 +6,7 @@ COPY zsh-in-docker.sh /tmp/zsh-in-docker.sh
# Systemctl within Docker and Python 3.9
RUN DEBIAN_FRONTEND=noninteractive apt-get -y update \
&& echo "------------------------------------------------------ Common stuff" \
&& echo "------------------------------------------------------ Common" \
&& apt-get install -y sudo curl wget telnet jq \
&& apt-get install -y software-properties-common \
&& apt-get install -y zip gzip tar \
@ -26,7 +26,8 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get -y update \
&& pip install --upgrade setuptools \
&& pip install --upgrade distlib \
&& update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1 \
&& echo "------------------------------------------------------ Allow users some priviledged actions" \
&& apt-get install -y python-is-python3 \
&& echo "------------------------------------------------------ Allow users to install packages with apt" \
&& echo "# Allow non-admin users to install packages" >> /etc/sudoers \
&& echo "abc ALL = NOPASSWD : /usr/bin/apt, /usr/bin/apt-get, /usr/bin/aptitude, /usr/bin/add-apt-repository, /usr/local/bin/pip, /usr/local/bin/systemctl, /usr/bin/dpkg, /usr/sbin/dpkg-reconfigure" >> /etc/sudoers \
&& echo "------------------------------------------------------ GIT" \
@ -154,6 +155,10 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get -y update \
USER abc
RUN echo "------------------------------------------------------ Pipx" \
&& python3 -m pip install --user pipx \
&& python3 -m pipx ensurepath
ENV PATH="/home/abc/.local/bin:${PATH}"
###### ENTRY

View file

@ -1,158 +0,0 @@
FROM ubuntu:18.04
COPY unified-supervisord.conf supervisord.conf /etc/supervisord/
COPY mc.ini /home/abc/.config/mc/ini
COPY zsh-in-docker.sh /tmp/zsh-in-docker.sh
# Systemctl within Docker and Python 3.9
RUN DEBIAN_FRONTEND=noninteractive apt-get update \
&& apt-get install -y wget \
&& wget https://raw.githubusercontent.com/gdraheim/docker-systemctl-replacement/master/files/docker/systemctl.py -O /usr/local/bin/systemctl \
&& chmod 0777 /usr/local/bin/systemctl \
&& apt-get install -y software-properties-common \
&& apt-get install -y apache2-utils \
&& apt-get install -y zip gzip tar \
&& echo "------------------------------------------------------ User" \
&& useradd -u 8877 abc \
&& chmod -R 777 /home \
&& mkdir -p /home/abc \
&& chown -R abc /home/abc \
&& echo "------------------------------------------------------ Python" \
&& add-apt-repository ppa:deadsnakes/ppa \
&& apt-get install -y python3.9 \
&& update-alternatives --install /usr/bin/python python /usr/bin/python3.9 10 \
&& update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 10 \
&& apt-get install -y python3-distutils \
&& apt-get install -y python3.9-distutils \
&& apt-get install -y python3-pip \
&& apt-get install python3.9-venv \
&& pip3 install --upgrade pip \
&& pip3 install --upgrade setuptools \
&& pip3 install --upgrade distlib \
&& update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1 \
&& echo "------------------------------------------------------ Common Packages" \
&& apt-get install -y sudo git curl wget telnet jq \
&& apt-get install -y mc ncdu htop \
&& apt-get install -y nano vim \
&& apt-get install -y git git-flow \
&& echo "# Allow non-admin users to install packages" >> /etc/sudoers \
&& echo "abc ALL = NOPASSWD : /usr/bin/apt, /usr/bin/apt-get, /usr/bin/aptitude, /usr/local/bin/pip, /usr/local/bin/systemctl, /usr/bin/dpkg, /usr/sbin/dpkg-reconfigure" >> /etc/sudoers \
&& echo "------------------------------------------------------ Nodeenv" \
&& pip install nodeenv \
&& apt-get install -y yarn \
&& echo "------------------------------------------------------ Cron" \
&& apt-get install -y cron \
&& mkdir -p /var/log/supervisord/ \
&& chmod -R 777 /var/spool/cron/crontabs \
&& chmod -R 777 /var/log \
&& chmod gu+rw /var/run \
&& chmod gu+s /usr/sbin/cron \
&& echo "# Allow cron for user abc" >> /etc/sudoers \
&& echo "abc ALL = NOPASSWD : /usr/sbin/cron " >> /etc/sudoers \
&& echo "------------------------------------------------------ Supervisor" \
&& apt-get remove -y cmdtest \
&& apt-get install -y supervisor \
&& pip3 install supervisor==4.2.2 \
&& apt-get update \
&& apt-get install -y systemd \
&& chmod -R 777 /etc/supervisord/ \
&& chmod -R 777 /var/log/supervisord/ \
&& echo "------------------------------------------------------ ZSH root" \
&& HOME=/root \
&& chmod +x /tmp/zsh-in-docker.sh \
&& /tmp/zsh-in-docker.sh \
-t https://github.com/pascaldevink/spaceship-zsh-theme \
-a 'SPACESHIP_PROMPT_ADD_NEWLINE="false"' \
-a 'SPACESHIP_PROMPT_SEPARATE_LINE="false"' \
-a 'export LS_COLORS="$LS_COLORS:ow=1;34:tw=1;34:"' \
-a 'SPACESHIP_USER_SHOW="false"' \
-a 'SPACESHIP_TIME_SHOW="true"' \
-a 'SPACESHIP_TIME_COLOR="grey"' \
-a 'SPACESHIP_DIR_COLOR="cyan"' \
-a 'SPACESHIP_GIT_SYMBOL="⇡"' \
-a 'SPACESHIP_BATTERY_SHOW="false"' \
-a 'if [[ $(pwd) != /root ]]; then cd /root; fi # Set starting dir to /root ' \
-a 'hash -d r=/root' \
-p git \
-p https://github.com/zsh-users/zsh-autosuggestions \
-p https://github.com/zsh-users/zsh-completions \
-p https://github.com/zsh-users/zsh-history-substring-search \
-p https://github.com/zsh-users/zsh-syntax-highlighting \
-p 'history-substring-search' \
-p https://github.com/bobthecow/git-flow-completion \
-a 'bindkey "\$terminfo[kcuu1]" history-substring-search-up' \
-a 'bindkey "\$terminfo[kcud1]" history-substring-search-down' \
&& printf '%s\n%s\n' "export ZSH_DISABLE_COMPFIX=true" "$(cat /root/.zshrc)" > /root/.zshrc \
&& echo "------------------------------------------------------ ZSH abc" \
&& mkdir -p /home/project \
&& HOME=/home/abc \
&& /tmp/zsh-in-docker.sh \
-t https://github.com/pascaldevink/spaceship-zsh-theme \
-a 'SPACESHIP_PROMPT_ADD_NEWLINE="false"' \
-a 'SPACESHIP_PROMPT_SEPARATE_LINE="false"' \
-a 'export LS_COLORS="$LS_COLORS:ow=1;34:tw=1;34:"' \
-a 'SPACESHIP_USER_SHOW="true"' \
-a 'SPACESHIP_TIME_SHOW="true"' \
-a 'SPACESHIP_TIME_COLOR="grey"' \
-a 'SPACESHIP_DIR_COLOR="cyan"' \
-a 'SPACESHIP_GIT_SYMBOL="⇡"' \
-a 'SPACESHIP_BATTERY_SHOW="false"' \
-a 'if [[ $(pwd) != /home/project ]]; then cd /home/project; fi # Set starting dir to /home/project ' \
-a 'hash -d p=/home/project' \
-p git \
-p https://github.com/zsh-users/zsh-autosuggestions \
-p https://github.com/zsh-users/zsh-completions \
-p https://github.com/zsh-users/zsh-history-substring-search \
-p https://github.com/zsh-users/zsh-syntax-highlighting \
-p 'history-substring-search' \
-p https://github.com/bobthecow/git-flow-completion \
-a 'bindkey "\$terminfo[kcuu1]" history-substring-search-up' \
-a 'bindkey "\$terminfo[kcud1]" history-substring-search-down' \
&& rm /tmp/zsh-in-docker.sh \
&& printf '%s\n%s\n' "export ZSH_DISABLE_COMPFIX=true" "$(cat /home/abc/.zshrc)" > /home/abc/.zshrc \
&& echo "------------------------------------------------------ Docker" \
&& apt-get install -y apt-transport-https ca-certificates gnupg lsb-release \
&& curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg \
&& echo \
"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null \
&& apt-get update \
&& apt-get install -y docker-ce docker-ce-cli containerd.io \
&& curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose \
&& chmod +x /usr/local/bin/docker-compose \
&& echo "------------------------------------------------------ Web-based terminal" \
&& cd /tmp && wget https://github.com/tsl0922/ttyd/releases/download/1.6.3/ttyd.x86_64 \
&& mv ttyd.x86_64 /usr/bin/ttyd \
&& chmod +x /usr/bin/ttyd \
&& echo "------------------------------------------------------ utils" \
&& git clone https://github.com/bluxmit/alnoda-workspaces /tmp/alnoda-workspaces \
&& mv /tmp/alnoda-workspaces/utils /home/abc/ \
&& rm -rf /tmp/alnoda-workspaces \
&& echo "------------------------------------------------------ User" \
&& chown abc /home/project \
&& chmod 777 /etc/supervisord/ \
&& mkdir -p /home/abc/.local/bin \
&& chmod 755 /home/abc/.local && chmod 755 /home/abc/.local/bin \
&& chown abc /home/abc/.local && chown abc /home/abc/.local/bin \
&& find /home -type d | xargs -I{} chown -R abc {} \
&& find /home -type f | xargs -I{} chown abc {} \
&& echo "------------------------------------------------------ Clean" \
&& apt-get -y autoremove \
&& apt-get -y clean \
&& apt-get -y autoclean
USER abc
ENV PATH="/home/abc/.local/bin:${PATH}"
###### ENTRY
# note! this will have consequences only when started as root (docker run ... --user root ...)
# systemctl start systemd-journald
# this entrypoint should be the same for all images that are built on top of this one
ENTRYPOINT /etc/init.d/cron start; systemctl start systemd-journald; supervisord -c "/etc/supervisord/unified-supervisord.conf"

View file

@ -1,139 +0,0 @@
FROM ubuntu:18.04
COPY unified-supervisord.conf supervisord.conf /etc/supervisord/
COPY mc.ini /home/abc/.config/mc/ini
COPY zsh-in-docker.sh /tmp/zsh-in-docker.sh
# Systemctl within Docker and Python 3.9
RUN DEBIAN_FRONTEND=noninteractive apt-get update \
&& apt-get install -y wget \
&& wget https://raw.githubusercontent.com/gdraheim/docker-systemctl-replacement/master/files/docker/systemctl.py -O /usr/local/bin/systemctl \
&& chmod 0777 /usr/local/bin/systemctl \
&& apt-get install -y software-properties-common \
&& apt-get install -y zip gzip tar \
&& echo "------------------------------------------------------ User" \
&& useradd -u 8877 abc \
&& chmod -R 777 /home \
&& mkdir -p /home/abc \
&& chown -R abc /home/abc \
&& echo "------------------------------------------------------ Python" \
&& add-apt-repository ppa:deadsnakes/ppa \
&& apt-get install -y python3.9 \
&& update-alternatives --install /usr/bin/python python /usr/bin/python3.9 10 \
&& update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 10 \
&& apt-get install -y python3-distutils \
&& apt-get install -y python3.9-distutils \
&& apt-get install -y python3-pip \
&& apt-get install python3.9-venv \
&& pip3 install --upgrade pip \
&& pip3 install --upgrade setuptools \
&& pip3 install --upgrade distlib \
&& update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1 \
&& echo "------------------------------------------------------ Common Packages" \
&& apt-get install -y sudo git curl wget telnet jq \
&& apt-get install -y mc ncdu htop \
&& apt-get install -y nano vim \
&& apt-get install -y git git-flow \
&& echo "# Allow non-admin users to install packages" >> /etc/sudoers \
&& echo "abc ALL = NOPASSWD : /usr/bin/apt, /usr/bin/apt-get, /usr/bin/aptitude, /usr/local/bin/pip, /usr/local/bin/systemctl, /usr/bin/dpkg, /usr/sbin/dpkg-reconfigure" >> /etc/sudoers \
&& echo "------------------------------------------------------ Nodeenv" \
&& pip install nodeenv \
&& apt-get install -y yarn \
&& echo "------------------------------------------------------ Cron" \
&& apt-get install -y cron \
&& mkdir -p /var/log/supervisord/ \
&& chmod -R 777 /var/spool/cron/crontabs \
&& chmod -R 777 /var/log \
&& chmod gu+rw /var/run \
&& chmod gu+s /usr/sbin/cron \
&& echo "# Allow cron for user abc" >> /etc/sudoers \
&& echo "abc ALL = NOPASSWD : /usr/sbin/cron " >> /etc/sudoers \
&& echo "------------------------------------------------------ Supervisor" \
&& apt-get remove -y cmdtest \
&& apt-get install -y supervisor \
&& pip3 install supervisor==4.2.2 \
&& apt-get update \
&& apt-get install -y systemd \
&& chmod -R 777 /etc/supervisord/ \
&& chmod -R 777 /var/log/supervisord/ \
&& echo "------------------------------------------------------ ZSH root" \
&& HOME=/root \
&& chmod +x /tmp/zsh-in-docker.sh \
&& /tmp/zsh-in-docker.sh \
-t https://github.com/pascaldevink/spaceship-zsh-theme \
-a 'SPACESHIP_PROMPT_ADD_NEWLINE="false"' \
-a 'SPACESHIP_PROMPT_SEPARATE_LINE="false"' \
-a 'export LS_COLORS="$LS_COLORS:ow=1;34:tw=1;34:"' \
-a 'SPACESHIP_USER_SHOW="false"' \
-a 'SPACESHIP_TIME_SHOW="true"' \
-a 'SPACESHIP_TIME_COLOR="grey"' \
-a 'SPACESHIP_DIR_COLOR="cyan"' \
-a 'SPACESHIP_GIT_SYMBOL="⇡"' \
-a 'SPACESHIP_BATTERY_SHOW="false"' \
-a 'if [[ $(pwd) != /root ]]; then cd /root; fi # Set starting dir to /root ' \
-a 'hash -d r=/root' \
-p git \
-p https://github.com/zsh-users/zsh-autosuggestions \
-p https://github.com/zsh-users/zsh-completions \
-p https://github.com/zsh-users/zsh-history-substring-search \
-p https://github.com/zsh-users/zsh-syntax-highlighting \
-p 'history-substring-search' \
-p https://github.com/bobthecow/git-flow-completion \
-a 'bindkey "\$terminfo[kcuu1]" history-substring-search-up' \
-a 'bindkey "\$terminfo[kcud1]" history-substring-search-down' \
&& printf '%s\n%s\n' "export ZSH_DISABLE_COMPFIX=true" "$(cat /root/.zshrc)" > /root/.zshrc \
&& echo "------------------------------------------------------ ZSH abc" \
&& mkdir -p /home/project \
&& HOME=/home/abc \
&& /tmp/zsh-in-docker.sh \
-t https://github.com/pascaldevink/spaceship-zsh-theme \
-a 'SPACESHIP_PROMPT_ADD_NEWLINE="false"' \
-a 'SPACESHIP_PROMPT_SEPARATE_LINE="false"' \
-a 'export LS_COLORS="$LS_COLORS:ow=1;34:tw=1;34:"' \
-a 'SPACESHIP_USER_SHOW="true"' \
-a 'SPACESHIP_TIME_SHOW="true"' \
-a 'SPACESHIP_TIME_COLOR="grey"' \
-a 'SPACESHIP_DIR_COLOR="cyan"' \
-a 'SPACESHIP_GIT_SYMBOL="⇡"' \
-a 'SPACESHIP_BATTERY_SHOW="false"' \
-a 'if [[ $(pwd) != /home/project ]]; then cd /home/project; fi # Set starting dir to /home/project ' \
-a 'hash -d p=/home/project' \
-p git \
-p https://github.com/zsh-users/zsh-autosuggestions \
-p https://github.com/zsh-users/zsh-completions \
-p https://github.com/zsh-users/zsh-history-substring-search \
-p https://github.com/zsh-users/zsh-syntax-highlighting \
-p 'history-substring-search' \
-p https://github.com/bobthecow/git-flow-completion \
-a 'bindkey "\$terminfo[kcuu1]" history-substring-search-up' \
-a 'bindkey "\$terminfo[kcud1]" history-substring-search-down' \
&& rm /tmp/zsh-in-docker.sh \
&& printf '%s\n%s\n' "export ZSH_DISABLE_COMPFIX=true" "$(cat /home/abc/.zshrc)" > /home/abc/.zshrc \
&& echo "------------------------------------------------------ User" \
&& chown abc /home/project \
&& chmod 777 /etc/supervisord/ \
&& mkdir -p /home/abc/.local/bin \
&& chmod 755 /home/abc/.local && chmod 755 /home/abc/.local/bin \
&& chown abc /home/abc/.local && chown abc /home/abc/.local/bin \
&& find /home -type d | xargs -I{} chown -R abc {} \
&& find /home -type f | xargs -I{} chown abc {} \
&& echo "------------------------------------------------------ Clean" \
&& apt-get -y autoremove \
&& apt-get -y clean \
&& apt-get -y autoclean
USER abc
ENV PATH="/home/abc/.local/bin:${PATH}"
###### ENTRY
# note! this will have consequences only when started as root (docker run ... --user root ...)
# systemctl start systemd-journald
# this entrypoint should be the same for all images that are built on top of this one
ENTRYPOINT /etc/init.d/cron start; systemctl start systemd-journald; supervisord -c "/etc/supervisord/unified-supervisord.conf"