Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Image for the 1CC RS course
# user = abc, password = abc
# sudo: no password
# Build:
# docker build -t 1elrs .
# Run:
# docker run --rm --detach --publish 3000:3000 --publish 3001:3001 --env TITLE=RS 1elrs:latest
# or, if you want to "mount" a host directory to the /home/abc/PersistentDir directory in the container:
# docker run --rm --detach --publish 3000:3000 --publish 3001:3001 --env TITLE=RS --volume YOUR_CHOICE_OF_PATH:/home/abc/PersistentDir:rw 1elrs:latest
# and to use your host user id and host group id (XXXX is given by id -u and YYYY by id -g):
# docker run --rm --detach --publish 3000:3000 --publish 3001:3001 --env TITLE=RS --env PUID=XXXX --env PGID=YYYY --volume YOUR_CHOICE_OF_PATH:/home/abc/PersistentDir:rw 1elrs:latest
# Connect to:
# Use a web browser and visit http://127.0.0.1:3000/
FROM lscr.io/linuxserver/webtop:ubuntu-xfce
# Give the abc user a regular home and nice prompt
RUN mkdir /home/abc && mkdir /home/abc/Downloads && mkdir /home/abc/PersistentDir && chown -R abc:abc /home/abc && usermod -d /home/abc abc
RUN echo "PS1='\u@graoully:\w\$ '" >> /home/abc/.bashrc
RUN echo "alias ls='ls --color=auto'" >> /etc/bash.bashrc
ENV HOME=/home/abc
# Install a few utilities
RUN apt-get update && apt-get upgrade -y && \
apt-get install -y zip unzip git gedit tree iputils-ping wget vim net-tools traceroute evince
# get rid of gedit warning messages
RUN echo "#!/bin/bash" > /usr/bin/gedit-null && echo "/usr/bin/gedit \""\$\@\"" 2>/dev/null" >> /usr/bin/gedit-null && chmod 755 /usr/bin/gedit-null
RUN echo "alias gedit=/usr/bin/gedit-null" >> /etc/bash.bashrc
# Add bookmarks to Firefox
COPY profiles.ini /home/abc/.mozilla/firefox/profiles.ini
COPY prefs.js /home/abc/.mozilla/firefox/rs.default-release/prefs.js
COPY favicons.sqlite /home/abc/.mozilla/firefox/rs.default-release/favicons.sqlite
COPY places.sqlite /home/abc/.mozilla/firefox/rs.default-release/places.sqlite
RUN chown -R abc:abc /home/abc/.mozilla/
## Python
RUN apt-get install -y python3 python3-venv python3-pip pip
# Pytest
RUN apt-get install -y python3-pytest
# latest VSCodium version
RUN wget -qO - https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg | gpg --dearmor | dd of=/usr/share/keyrings/vscodium-archive-keyring.gpg
RUN echo 'deb [ signed-by=/usr/share/keyrings/vscodium-archive-keyring.gpg ] https://download.vscodium.com/debs vscodium main' | tee /etc/apt/sources.list.d/vscodium.list && apt update
RUN apt install -y codium
RUN echo "alias codium='codium --no-sandbox'" >> /etc/bash.bashrc
RUN sed -i 's/\/usr\/share\/codium\/codium /\/usr\/share\/codium\/codium --no-sandbox /g' /usr/share/applications/codium.desktop
# Python extension
RUN mkdir -p /home/abc/.vscode-oss/extensions && chown -R abc:abc /home/abc/.vscode-oss && cd /home/abc/.vscode-oss/extensions && wget https://openvsxorg.blob.core.windows.net/resources/ms-python/python/2023.12.0/ms-python.python-2023.12.0.vsix && unzip ms-python.python-2023.12.0.vsix
# Filius (a network simulator)
#RUN apt-get install -y openjdk-17-jdk openjdk-17-jre
#RUN wget https://www.lernsoftware-filius.de/downloads/Setup/filius_2.5.1_all.deb && apt install -y ./filius_2.5.1_all.deb && rm filius_2.5.1_all.deb
#RUN mkdir /home/abc/.filius && chown -R abc:abc /home/abc/.filius
#COPY konfig.xml /home/abc/.filius
# JASPER (for the Alternate Bit Protocol simulation)
# use "appletviewer jasper-1.7/html/ABP.html" to launch the applet
COPY jasper-1.7.zip /home/abc/
RUN unzip /home/abc/jasper-1.7.zip -d /home/abc/ && rm /home/abc/jasper-1.7.zip && chown -R abc:abc /home/abc/jasper-1.7
RUN apt-get update && apt-get upgrade -y && \
apt-get install -y openjdk-8-jdk
# pour Jérôme François
RUN apt-get update && apt-get upgrade -y && \
apt-get install -y hping3 wireshark
RUN pip install --no-cache-dir --upgrade --break-system-packages pip && \
pip install --no-cache-dir --break-system-packages streamlit pillow
RUN mkdir -p /home/abc/gallery
COPY JeromeFrancois/ /home/abc/gallery/
RUN chown -R abc:abc /home/abc/gallery && usermod -d /home/abc/gallery abc
# Clean up
RUN apt-get clean && \
rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*