major upd: alnoda-workspace

This commit is contained in:
bluxmit 2023-06-16 19:07:19 +00:00
parent d8704a4627
commit 6dbf4769ee
13 changed files with 41 additions and 402 deletions

View file

@ -1,4 +1,4 @@
FROM alnoda/ubuntu-workspace:4.0-20.04
FROM alnoda/ubuntu-workspace:5.10-20.04
# Make image Alnoda-compatible - add dir for logs
USER root
@ -10,7 +10,6 @@ USER abc
# Install workspace tools and applications
RUN sudo apt-get -y update \
&& sudo apt-get install -y socat \
&& sudo apt-get install -y s3fs \
&& echo "------------------------------------------------------ install filebrowser" \
&& cd /tmp && wget https://github.com/filebrowser/filebrowser/releases/download/v2.21.1/linux-amd64-filebrowser.tar.gz \
&& mkdir /tmp/filebrowser \
@ -33,6 +32,6 @@ COPY --chown=abc:abc filebrowser.json /home/abc/apps/filebrowser/.filebrowser.js
# Build Alnoda workspace
COPY --chown=abc:abc workspace /tmp/workspace
RUN echo "------------------------------------------------------ build workspace" \
&& pipx install alnoda-wrk==0.3.36 \
&& pipx install alnoda-wrk==0.4.16 \
&& alnoda-wrk build /tmp/workspace \
&& rm -rf /tmp/workspace

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

View file

@ -3,13 +3,13 @@
name: Alnoda workspace
doc_url: https://docs.alnoda.org/
author: bluxmit
version: 1.0
version: 1.1
date: 15-03-2023
repository: https://github.com/bluxmit/alnoda-workspaces
description: |
Hyperflexible isolated containerized development environment that is actually easy to use
tags: workspace-ui, filebrowser, ungit, ngrok
tags: workspace-ui, filebrowser
# optional:
# (Quickstart UI appearance)
@ -45,16 +45,7 @@ pages:
title: Workspace admin
description: "Configure workspace. Start new applicatios and services. Share workspace."
image: alnoda-admin.png
- name: M.Commander
port: 8025
title: M.Commander
description: Feature rich visual file manager with internal text viewer and editor
image: mc.jpg
- name: Htop
port: 8026
title: Process monitor
description: Monitor running process and resource utilization
image: htop.jpg
# optional:
# (applications and services to launch every time workspace starts)
@ -69,16 +60,4 @@ start:
- name: TERM
value: xterm
cmd: ttyd -p 8024 -P 15 /bin/zsh -c 'alnoda-wrk admin'
- name: MC
env_vars:
- name: TERM
value: xterm
- name: EDITOR
value: mcedit
cmd: ttyd -p 8025 -P 15 /bin/zsh -c '/usr/bin/mc'
- name: Htop
env_vars:
- name: TERM
value: xterm
cmd: ttyd -p 8026 /bin/zsh -c '/usr/bin/htop'

View file

@ -1,54 +1,13 @@
FROM alnoda/base-devspace:1.0
FROM alnoda/alnoda-workspace:1.10
# Set environmental variables for Code-server
ARG CODESERVER_VERSION="4.7.0"
# Install Code-server and extensions
RUN wrk install code-server==4.13.0
RUN wrk install codeserver-common-extensions==0.0.1
RUN wrk install codeserver-themes-collection==0.1
# Install Code-server
RUN echo "------------------------------------------------------ code-server" \
&& cd /tmp \
&& curl -fOL https://github.com/coder/code-server/releases/download/v$CODESERVER_VERSION/code-server_${CODESERVER_VERSION}_amd64.deb \
&& sudo dpkg -i code-server_${CODESERVER_VERSION}_amd64.deb \
&& rm /tmp/code-server_${CODESERVER_VERSION}_amd64.deb
# Install codeserver extensions
RUN echo "------------------------------------------------------ common extensions" \
&& code-server --install-extension mhutchie.git-graph \
&& code-server --install-extension redhat.vscode-yaml \
&& code-server --install-extension mechatroner.rainbow-csv \
&& code-server --install-extension formulahendry.auto-close-tag \
&& code-server --install-extension formulahendry.auto-rename-tag \
&& code-server --install-extension anteprimorac.html-end-tag-labels \
&& code-server --install-extension abusaidm.html-snippets \
&& code-server --install-extension sndst00m.vscode-native-svg-preview \
&& code-server --install-extension pranaygp.vscode-css-peek \
&& code-server --install-extension anseki.vscode-color \
&& echo "------------------------------------------------------ color themes" \
&& code-server --install-extension armandphilippot.coldark \
&& code-server --install-extension RobbOwen.synthwave-vscode \
&& code-server --install-extension nadim-vscode.infinity-dark-theme \
&& code-server --install-extension emroussel.atomize-atom-one-dark-theme \
&& code-server --install-extension teabyii.ayu \
&& code-server --install-extension wesbos.theme-cobalt2 \
&& code-server --install-extension github.github-vscode-theme \
&& code-server --install-extension armandphilippot.coldark \
&& code-server --install-extension radiolevity.search-lights \
&& code-server --install-extension vladeeg.vscode-theme-vlight \
&& code-server --install-extension akamud.vscode-theme-onelight \
&& code-server --install-extension akamud.vscode-theme-onedark \
&& code-server --install-extension rubjo.ultimate-dark-neo \
&& code-server --install-extension sainnhe.edge \
&& code-server --install-extension lakshitsomani.best-themes-redefined \
&& code-server --install-extension usernamehw.prism \
&& echo "------------------------------------------------------ icons" \
&& code-server --install-extension emroussel.atom-icons \
&& code-server --install-extension laurenttreguier.vscode-simple-icons
# Set default codeserver terminal
ENV SHELL=/bin/zsh
# Set default codeserver theme
# Set default codeserver theme (because why not)
COPY --chown=abc:abc settings.json /home/abc/.local/share/code-server/User/settings.json
# Build Alnoda workspace
# Build Alnoda workspace (change UI, icons, fonts)
COPY --chown=abc:abc workspace /tmp/workspace
RUN pipx uninstall alnoda-wrk; pipx install alnoda-wrk; alnoda-wrk build /tmp/workspace && rm -rf /tmp/workspace
# RUN wrk build /tmp/workspace && rm -rf /tmp/workspace

Binary file not shown.

Before

Width:  |  Height:  |  Size: 306 KiB

View file

@ -3,18 +3,19 @@
name: Code-server workspace
doc_url: https://docs.alnoda.org/workspaces/codeserver-workspace/
author: bluxmit
version: 4.0
version: 5.0
repository: https://github.com/bluxmit/alnoda-workspaces
description: |
# Code-server workspace
Browser-based portable and containerized general-purpose development environment.
Includes code editor, terminal, file browser and git manager.
Includes code editor (code-server), terminal, file browser and git manager.
tags: web-ide, codeserver
# UI icons
logo: codeserver-circle-white.svg
favicon: codeserver-circle.svg
# Change styles
styles:
colors:
light:
@ -24,16 +25,3 @@ styles:
code_text: "#EAB676"
code_background: "#3C3C3C"
pages:
home:
- name: IDE
port: 8021
path: /
title: IDE
description: "Browser-based version of Visual Studio. Develop in any language, install hundreeds of extensions"
image: IDE.jpg
# add applications and services to the start command
start:
- name: Code-server
cmd: code-server --bind-addr 0.0.0.0:8021 --auth "none" --disable-telemetry /home

View file

@ -1,97 +0,0 @@
Few of the Extended Markdown features
#### Code
```{.py3 linenums="1" hl_lines="5-7"}
def insertion_sort(nums):
for i in range(1, len(nums)):
item_to_insert = nums[i]
j = i - 1
while j >= 0 and nums[j] > item_to_insert:
nums[j + 1] = nums[j]
j -= 1
nums[j + 1] = item_to_insert
```
#### Emoji
:smile: :heart: :thumbsup: :100: :muscle: :accept: :point_up: :airplane: :champagne: :raised_hands: :boom: :laughing: :metal: :handshake: :older_man: :sheep: :no_entry: :mouse: :relieved: :question: :wink: :wave: :rainbow: :sleeping:
#### Critic
We Uber drivers never know whom were going to end up with as a passenger {--in the same car--}.
One day, I was driving over a new bridge, the design of which was very {~~confusing~>ugly~~}.
Completely confounded, {==I muttered==}{>>Actually I said it out loud<<}, “Id love to meet the {~~genius~>retard~~}
who designed this mess.” With that, my passenger {==extended his hand in my direction==}{>>I thought he wanted to choke me<<}
and said, “Well, today is your {--*very*--} lucky day. My name is Mike, I work for the county engineers office,
and Im the {==genius==}{>>obviously an irony<<} who designed this!”. Surprisingly, he still gave me a tip {++**of 2 dollars**++}.
#### Keys
++enter++ ++tab++ ++space++ ++arrow-up++ ++arrow-down++ ++page-up++ ++home++ ++backspace++ ++insert++
#### Tabls, lists & admonitions
!!! example "Tasklist"
=== "Output"
- [X] Plans at work
* [X] Make vanilla pudding. Put in mayo jar. Eat in the office during the lunch break
* [X] Wear shirt that says “Life”. Hand out lemons to colleagues.
* [ ] Hire two private investigators. Get them to follow each other.
- [ ] Personal plans
* [X] Make an alcoholic beverage and name it “responsibly.” Start drinking Responsibly.
* [ ] Sneeze in front of the Pope. Get blessed.
* [ ] Buy a horse, name it “Oscar Takes The Lead,” enter it in horse races.
=== "Markdown"
```
- [X] Plans at work
* [X] Make vanilla pudding. Put in mayo jar. Eat in the office during the lunch break
* [X] Wear shirt that says “Life”. Hand out lemons to colleagues.
* [ ] Hire two private investigators. Get them to follow each other.
- [ ] Personal plans
* [X] Make an alcoholic beverage and name it “responsibly.” Start drinking Responsibly.
* [ ] Sneeze in front of the Pope. Get blessed.
* [ ] Buy a horse, name it “Oscar Takes The Lead,” enter it in horse races.
```
#### Tables
**Substance** | **Description**
:--- | ---:
**Bombastium** | Rarest element in the world. Dropped into a barrel of water becomes one barrel of ice cream
**Jerktonium** | Ingestion of jerktonium causes a bad attitude, but the effects are curable by song.
**Philote** | The smallest possible particle, occupying no space at all.
#### Formulas
$$
\left(\frac{\left(\sqrt{\frac{73^2}{12x}}\sqrt{\frac{x|x|}{\log_x}}\right)}{\sqrt[3]{\frac xy}}\right)
$$
#### Diagrams
```mermaid
classDiagram
Animal <|-- Duck
Animal <|-- Fish
Animal <|-- Zebra
class Animal{
+int age
+String gender
+isMammal()
+mate()
}
class Duck{
+String beakColor
+swim()
+quack()
}
class Fish{
-int sizeInFeet
-canEat()
}
class Zebra{
+bool is_wild
+run()
}
```

View file

@ -1,97 +0,0 @@
Few of the Extended Markdown features
#### Code
```{.py3 linenums="1" hl_lines="5-7"}
def insertion_sort(nums):
for i in range(1, len(nums)):
item_to_insert = nums[i]
j = i - 1
while j >= 0 and nums[j] > item_to_insert:
nums[j + 1] = nums[j]
j -= 1
nums[j + 1] = item_to_insert
```
#### Emoji
:smile: :heart: :thumbsup: :100: :muscle: :accept: :point_up: :airplane: :champagne: :raised_hands: :boom: :laughing: :metal: :handshake: :older_man: :sheep: :no_entry: :mouse: :relieved: :question: :wink: :wave: :rainbow: :sleeping:
#### Critic
We Uber drivers never know whom were going to end up with as a passenger {--in the same car--}.
One day, I was driving over a new bridge, the design of which was very {~~confusing~>ugly~~}.
Completely confounded, {==I muttered==}{>>Actually I said it out loud<<}, “Id love to meet the {~~genius~>retard~~}
who designed this mess.” With that, my passenger {==extended his hand in my direction==}{>>I thought he wanted to choke me<<}
and said, “Well, today is your {--*very*--} lucky day. My name is Mike, I work for the county engineers office,
and Im the {==genius==}{>>obviously an irony<<} who designed this!”. Surprisingly, he still gave me a tip {++**of 2 dollars**++}.
#### Keys
++enter++ ++tab++ ++space++ ++arrow-up++ ++arrow-down++ ++page-up++ ++home++ ++backspace++ ++insert++
#### Tabls, lists & admonitions
!!! example "Tasklist"
=== "Output"
- [X] Plans at work
* [X] Make vanilla pudding. Put in mayo jar. Eat in the office during the lunch break
* [X] Wear shirt that says “Life”. Hand out lemons to colleagues.
* [ ] Hire two private investigators. Get them to follow each other.
- [ ] Personal plans
* [X] Make an alcoholic beverage and name it “responsibly.” Start drinking Responsibly.
* [ ] Sneeze in front of the Pope. Get blessed.
* [ ] Buy a horse, name it “Oscar Takes The Lead,” enter it in horse races.
=== "Markdown"
```
- [X] Plans at work
* [X] Make vanilla pudding. Put in mayo jar. Eat in the office during the lunch break
* [X] Wear shirt that says “Life”. Hand out lemons to colleagues.
* [ ] Hire two private investigators. Get them to follow each other.
- [ ] Personal plans
* [X] Make an alcoholic beverage and name it “responsibly.” Start drinking Responsibly.
* [ ] Sneeze in front of the Pope. Get blessed.
* [ ] Buy a horse, name it “Oscar Takes The Lead,” enter it in horse races.
```
#### Tables
**Substance** | **Description**
:--- | ---:
**Bombastium** | Rarest element in the world. Dropped into a barrel of water becomes one barrel of ice cream
**Jerktonium** | Ingestion of jerktonium causes a bad attitude, but the effects are curable by song.
**Philote** | The smallest possible particle, occupying no space at all.
#### Formulas
$$
\left(\frac{\left(\sqrt{\frac{73^2}{12x}}\sqrt{\frac{x|x|}{\log_x}}\right)}{\sqrt[3]{\frac xy}}\right)
$$
#### Diargams
```mermaid
classDiagram
Animal <|-- Duck
Animal <|-- Fish
Animal <|-- Zebra
class Animal{
+int age
+String gender
+isMammal()
+mate()
}
class Duck{
+String beakColor
+swim()
+quack()
}
class Fish{
-int sizeInFeet
-canEat()
}
class Zebra{
+bool is_wild
+run()
}
```

View file

@ -1,90 +0,0 @@
# ===========================================================
# NAVIGATION
# ===========================================================
nav:
- Home: index.md
# ===========================================================
# CONFIGURATION
# ===========================================================
site_name: MkDocs Showcase
edit_uri: ""
# ===========================================================
# APPEARANCE
# ===========================================================
theme:
name: 'material'
icon:
repo: fontawesome/brands/github
features:
- search.suggest
palette:
- scheme: default
primary: indigo
accent: blue
extra:
# Link to open when your logo is clicked
homepage: https://alnoda.org
host_url: http://localhost
plugins:
- search
- include-markdown
# Enable Macros and jinja2 templates
- awesome-pages
# mermaid2 diagrams: https://mermaid-js.github.io/mermaid/#/
- mermaid2:
arguments:
theme: forest # default, forest, dark, neutral, base
themeCSS: ".er.entityLabel{fill: black;} .messageLine0{stroke: orange;} .messageLine1{stroke: orange;} #arrowhead{fill: orange;} .messageText{fill: black; stroke: black}"
markdown_extensions:
- def_list
- pymdownx.tasklist:
custom_checkbox: true
- pymdownx.arithmatex:
generic: true
- admonition
- pymdownx.inlinehilite
- pymdownx.details
- pymdownx.superfences:
# make exceptions to highlighting of code:
custom_fences:
- name: mermaid
class: mermaid
format: !!python/name:mermaid2.fence_mermaid
- pymdownx.tabbed
- abbr
- pymdownx.snippets
- attr_list
- pymdownx.emoji:
emoji_index: !!python/name:materialx.emoji.twemoji
emoji_generator: !!python/name:materialx.emoji.to_svg
- pymdownx.keys
- pymdownx.betterem
- pymdownx.caret
- pymdownx.critic
- pymdownx.escapeall
- pymdownx.smartsymbols
- pymdownx.tilde:
smart_delete: true
- footnotes
extra_javascript:
- https://polyfill.io/v3/polyfill.min.js?features=es6
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js
- https://unpkg.com/mermaid/dist/mermaid.min.js

View file

@ -1,5 +1,5 @@
# to run, execute in terminal
# python helloworld.py --local-scheduler HelloWorl
# python helloworld.py --local-scheduler HelloWorld
import luigi

View file

@ -10,5 +10,4 @@ __| |___) ) ) \__/ ( _| |__ \ \__/ / _| |__
EOF
echo "Luigi: $(python -c 'import luigi; print(luigi.__meta__.__version__)')"
echo "$(python -VV)"
exec luigid --port 8032

View file

@ -1,7 +1,7 @@
FROM alnoda/base-devspace:4.0
RUN echo "------------------------------------------------------ nvim" \
&& cd /tmp && wget https://github.com/neovim/neovim/releases/download/v0.8.0/nvim-linux64.tar.gz \
&& cd /tmp && wget https://github.com/neovim/neovim/releases/download/v0.9.0/nvim-linux64.tar.gz \
&& tar -xzf nvim-linux64.tar.gz \
&& mv /tmp/nvim-linux64 /home/abc/apps/nvim \
&& echo "------------------------------------------------------ spacevim" \

View file

@ -4,18 +4,24 @@ 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
RUN DEBIAN_FRONTEND=noninteractive apt-get -y update \
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y update \
&& echo "------------------------------------------------------ Common" \
&& apt-get install -y sudo curl wget telnet jq dnsutils \
&& apt-get install -y sudo jq git \
&& apt-get install -y curl wget telnet netcat dnsutils \
&& apt-get install -y software-properties-common \
&& apt-get install -y zip gzip tar \
&& apt-get install -y gdebi-core \
&& apt-get install -y acl \
&& apt-get install -y psmisc \
&& echo "------------------------------------------------------ User" \
&& useradd -u 8877 abc \
&& useradd -u 8877 -p $(openssl passwd -1 abc) abc \
&& chown -R abc /home \
&& mkdir -p /home/abc \
&& chown -R abc /home/abc \
&& mkdir -p /home/abc/apps \
&& chown -R abc /home/abc/apps \
&& setfacl -m u:abc:rwx /etc \
&& echo "------------------------------------------------------ Nix folder and conf" \
&& mkdir -m 0750 /nix && chown abc /nix \
&& echo "------------------------------------------------------ docker systemctl replacement" \
@ -30,19 +36,9 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get -y update \
&& apt-get install -y python-is-python3 \
&& mkdir -p /usr/bin/pip3.8 \
&& chown abc /usr/bin/pip3.8 \
&& 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/apt-key, /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 \
&& chown abc /etc/apt/sources.list.d \
&& chown abc /etc/apt/trusted.gpg.d \
&& echo "------------------------------------------------------ GIT" \
&& apt-get install -y git git-flow \
&& wget -P /tmp https://github.com/jesseduffield/lazygit/releases/download/v0.34/lazygit_0.34_Linux_x86_64.tar.gz \
&& mkdir /tmp/lazygit && tar -xzf /tmp/lazygit_0.34_Linux_x86_64.tar.gz --directory /tmp/lazygit \
&& chmod +x /tmp/lazygit/lazygit \
&& mv /tmp/lazygit/lazygit /usr/bin/ \
&& rm /tmp/lazygit_0.34_Linux_x86_64.tar.gz \
&& rm -rf /tmp/lazygit \
&& echo "------------------------------------------------------ Add abc user to sudo" \
&& sudo usermod -a -G sudo abc \
&& echo "abc ALL=(ALL) NOPASSWD: ALL " >> /etc/sudoers \
&& echo "------------------------------------------------------ Nodeenv" \
&& pip install nodeenv \
&& apt-get install -y yarn \
@ -53,8 +49,6 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get -y update \
&& chown -R abc /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 \
@ -124,9 +118,8 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get -y update \
&& apt-get install -y mc \
&& echo "------------------------------------------------------ multitasking in a terminal " \
&& apt-get install -y tmux \
&& echo "------------------------------------------------------ Sys monitoring: Glances, Vizex" \
&& echo "------------------------------------------------------ Sys monitoring" \
&& apt-get install -y ncdu htop \
&& pip install glances==3.2.5 \
&& echo "------------------------------------------------------ Web-based terminal" \
&& cd /tmp && wget https://github.com/tsl0922/ttyd/releases/download/1.7.1/ttyd.x86_64 \
&& mv ttyd.x86_64 /usr/bin/ttyd \
@ -144,7 +137,6 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get -y update \
&& echo "------------------------------------------------------ Aliases" \
&& echo 'alias python="python3"' >> /root/.zshrc \
&& echo 'alias python="python3"' >> /home/abc/.zshrc \
&& echo 'alias lg="lazygit"' >> /home/abc/.zshrc \
&& echo "------------------------------------------------------ Clean" \
&& apt-get -y autoremove \
&& apt-get -y clean \
@ -175,10 +167,17 @@ ENV PATH="/home/abc/bin:${PATH}"
ENV PATH="/home/abc/.local/bin:${PATH}"
ENV PATH="/home/abc/.nix-profile/bin:${PATH}"
RUN echo "------------------------------------------------------ after PATH updates" \
RUN DEBIAN_FRONTEND=noninteractive \
&& echo "------------------------------------------------------ after PATH updates" \
&& pipx install rich-cli \
&& echo 'alias p="rich"' >> /home/abc/.zshrc \
&& nix-env -iA cachix -f https://cachix.org/api/v1/install
&& nix-env -iA cachix -f https://cachix.org/api/v1/install \
&& echo "------------------------------------------------------ asdf" \
&& git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.11.3 \
&& rm -rf /home/abc/.asdf/.git \
&& echo '. "$HOME/.asdf/asdf.sh"' >> ~/.zshrc \
&& echo 'fpath=(${ASDF_DIR}/completions $fpath)' >> ~/.zshrc \
&& echo 'autoload -Uz compinit && compinit' >> ~/.zshrc
###### ENTRY