\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{KaiTraupel} \pdfinfo{ /Title (linux-datalab.pdf) /Creator (Cheatography) /Author (KaiTraupel) /Subject (Linux - Datalab Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{C2C2C2} \definecolor{LightBackground}{HTML}{F7F7F7} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{Linux - Datalab Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{KaiTraupel} via \textcolor{DarkBackground}{\uline{cheatography.com/210589/cs/45435/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}KaiTraupel \\ \uline{cheatography.com/kaitraupel} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Not Yet Published.\\ Updated 13th January, 2025.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{2} \begin{tabularx}{8.4cm}{x{6.72 cm} p{1.28 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Navigatie}} \tn % Row 0 \SetRowColor{LightBackground} Toon huidige directory & pwd \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} Toont bestanden & ls \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} Toont bestanden in detail & ls -l \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} Toon verborgen bestanden & ls -a \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} Toont bestandsgroottes & ls -h \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} Verander naar een directory & cd \tn % Row Count 6 (+ 1) % Row 6 \SetRowColor{LightBackground} Ga een directory hoger & cd .. \tn % Row Count 7 (+ 1) % Row 7 \SetRowColor{white} Ga naar home directory & cd \tn % Row Count 8 (+ 1) % Row 8 \SetRowColor{LightBackground} Ga naar rood directory & cd / \tn % Row Count 9 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Bestandsbeheer}} \tn % Row 0 \SetRowColor{LightBackground} Maak directory & mkdir \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} Maak onderliggende directories & mkdir -p \textless{}/oefening/test/\textgreater{} \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} Maak directory met permissies & mkdir -m \textless{}775\textgreater{} \textless{}map\textgreater{} \tn % Row Count 5 (+ 2) % Row 3 \SetRowColor{white} Maak bestand & touch \tn % Row Count 6 (+ 1) % Row 4 \SetRowColor{LightBackground} Kopieer directory & cp \tn % Row Count 7 (+ 1) % Row 5 \SetRowColor{white} Kopieer incl subdirectories & cp -r \tn % Row Count 9 (+ 2) % Row 6 \SetRowColor{LightBackground} Verplaats / hernoem & mv \tn % Row Count 10 (+ 1) % Row 7 \SetRowColor{white} Verwijder & rm \tn % Row Count 11 (+ 1) % Row 8 \SetRowColor{LightBackground} Forceer verwijderen & rm -f \tn % Row Count 12 (+ 1) % Row 9 \SetRowColor{white} Verwijder incl subniveau's & rm -r \tn % Row Count 14 (+ 2) % Row 10 \SetRowColor{LightBackground} Wijzig eigenaar van bestand & chown \textless{}user\textgreater{}:\textless{}group\textgreater{} \textless{}bestand\textgreater{} \tn % Row Count 16 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{5.36 cm} x{2.64 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Netwerk}} \tn % Row 0 \SetRowColor{LightBackground} Toon netwerkconfiguratie & ifconfig \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} Test verbinding met een host & ping \textless{}host\textgreater{} \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} Toon info netwerkinterfaces & iwconfig \tn % Row Count 5 (+ 2) % Row 3 \SetRowColor{white} Scan voor open poorten & nmap \textless{}host\textgreater{} \tn % Row Count 6 (+ 1) % Row 4 \SetRowColor{LightBackground} Toon luisterende poorten & netstat -tulnp \tn % Row Count 8 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{6 cm} x{2 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Systeeminfo}} \tn % Row 0 \SetRowColor{LightBackground} Toon schrijfruimte & df -h \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} Toon RAM gebruik & free -h \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} Toon systeeminfo & uname -a \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} Toon info systeembronnen & top \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} Toon actieve processen & ps aux \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} Toon gebruikersnaam & whoami \tn % Row Count 6 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{4.56 cm} x{3.44 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Overige}} \tn % Row 0 \SetRowColor{LightBackground} Handleiding commando & man \textless{}command\textgreater{} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} Redirect output naar bestand & \textless{}command\textgreater{} \textgreater{} \textless{}bestand\textgreater{} \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} Append output aan bestand & \textless{}inhoud\textgreater{} \textgreater{}\textgreater{} \textless{}bestand\textgreater{} \tn % Row Count 5 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.96 cm} x{5.04 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{influxDB}} \tn % Row 0 \SetRowColor{LightBackground} image & influxdb:2.7 \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} data volume & /var/lib/influxdb2 \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} config volume & /etc/influxdb2 \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} setup environment & - \seqsplit{DOCKER\_INFLUXDB\_INIT\_MODE=setup} \tn % Row Count 5 (+ 2) % Row 4 \SetRowColor{LightBackground} gebruiker environment & - DOCKER\_INFLUXDB\_INIT\_USERNAME=\textless{}gebruiker\textgreater{} \tn % Row Count 7 (+ 2) % Row 5 \SetRowColor{white} password environment & - DOCKER\_INFLUXDB\_INIT\_PASSWORD=\textless{}wachtwoord\textgreater{} \tn % Row Count 9 (+ 2) % Row 6 \SetRowColor{LightBackground} organisatie environment & - DOCKER\_INFLUXDB\_INIT\_ORG=\textless{}org naam\textgreater{} \tn % Row Count 11 (+ 2) % Row 7 \SetRowColor{white} bucket environment & - DOCKER\_INFLUXDB\_INIT\_BUCKET=\textless{}naam bucket\textgreater{} \tn % Row Count 13 (+ 2) % Row 8 \SetRowColor{LightBackground} token maken & docker compose exec \textless{}naam .yml voor influxdb\textgreater{} influx auth list \textgreater{} token (containers moeten up zijn) \tn % Row Count 17 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.04 cm} x{4.96 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Nginx}} \tn % Row 0 \SetRowColor{LightBackground} image & nginx \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} ports & "80:80" \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} html volume & /usr/share/nginx/html \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} config volume & \seqsplit{/etc/nginx/nginx.conf:ro} \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} htpasswd volume & /etc/nginx/htpasswd \tn % Row Count 5 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.52 cm} x{4.48 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Grafana}} \tn % Row 0 \SetRowColor{LightBackground} image & \seqsplit{grafana/grafana-oss:9.5.9-ubuntu} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} data volume & /var/lib/grafana \tn % Row Count 3 (+ 1) % Row 2 \SetRowColor{LightBackground} publieke dashboards environment & - \seqsplit{GF\_FEATURE\_TOGGLES\_ENABLE=publicDashboards} \tn % Row Count 5 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.84 cm} x{4.16 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Container Manueel / image bouwen}} \tn % Row 0 \SetRowColor{LightBackground} container manueel starten & docker run -p \textless{}port\textgreater{}:\textless{}port\textgreater{} -{}-name \textless{}naam kiezen\textgreater{} -d \textless{}image\textgreater{} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} container automatisch weg na gebruik & docker run \textless{}zoals hierboven\textgreater{} -{}-rm \textless{}image\textgreater{} \tn % Row Count 6 (+ 3) % Row 2 \SetRowColor{LightBackground} mount bestand aan een image file & docker run \textless{}zoals hierboven\textgreater{} -v \textless{}./map:image pad\textgreater{} \textless{}image\textgreater{} \tn % Row Count 9 (+ 3) % Row 3 \SetRowColor{white} toon manueel gestarte containers & docker ps -a \tn % Row Count 11 (+ 2) % Row 4 \SetRowColor{LightBackground} verwijder manueel gestarte containers & docker rm \textless{}container\textgreater{} \tn % Row Count 13 (+ 2) % Row 5 \SetRowColor{white} container stoppen & docker stop \textless{}container\textgreater{} \tn % Row Count 15 (+ 2) % Row 6 \SetRowColor{LightBackground} root shell starten in container & docker exec -it \textless{}container\textgreater{} /bin/bash \tn % Row Count 17 (+ 2) % Row 7 \SetRowColor{white} container opslaan als image & docker commit \textless{}container\textgreater{} \textless{}image naam kiezen\textgreater{} \tn % Row Count 20 (+ 3) % Row 8 \SetRowColor{LightBackground} image verwijderen & docker rmi \textless{}image:latest\textgreater{} \tn % Row Count 22 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.2 cm} x{4.8 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Image Naar Dockerhub}} \tn % Row 0 \SetRowColor{LightBackground} repo maken op dockerhub & inloggen \textgreater{} repositories \textgreater{} create repository \textgreater{} geef naam \textgreater{} create \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} inloggen op docker & docker login \tn % Row Count 5 (+ 2) % Row 2 \SetRowColor{LightBackground} one-time code invoeren & ga naar url \textgreater{} code invoeren \textgreater{} comfirm \tn % Row Count 7 (+ 2) % Row 3 \SetRowColor{white} maak image & zie "image bouwen" (bv test-image) \tn % Row Count 9 (+ 2) % Row 4 \SetRowColor{LightBackground} tag maken voor test-image & docker tag \textless{}test-image:latest\textgreater{} \textless{}kaitraupel/test-image:latest\textgreater{} \tn % Row Count 12 (+ 3) % Row 5 \SetRowColor{white} image naar dockerhub pushen & docker push \textless{}kaitraupel/test-image\textgreater{} \tn % Row Count 14 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.52 cm} x{4.48 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Mosquitto}} \tn % Row 0 \SetRowColor{LightBackground} image & eclipse-mosquitto \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} ports & "1883:1883" \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} config volume & \seqsplit{/mosquitto/config/mosquitto}.conf \tn % Row Count 4 (+ 2) % Row 3 \SetRowColor{white} mosquitto.conf poort & port 1883 \tn % Row Count 6 (+ 2) % Row 4 \SetRowColor{LightBackground} .conf anonieme verbinding & allow\_anonymous true \tn % Row Count 8 (+ 2) % Row 5 \SetRowColor{white} .conf user + ww & \textless{}passwd\textgreater{} -c /etc/mosquitto/passwd \textless{}gebruiker\textgreater{} \tn % Row Count 11 (+ 3) % Row 6 \SetRowColor{LightBackground} .conf log events naar bestand & log\_dest file \seqsplit{/var/log/mosquitto/mosquitto}.log (er onder) log\_type all \tn % Row Count 15 (+ 4) % Row 7 \SetRowColor{white} .conf berichten opslaan & persistence true (er onder) persistence\_file mosquitto.db \tn % Row Count 18 (+ 3) % Row 8 \SetRowColor{LightBackground} .conf max verbindingen instellen & max\_connections 100 \tn % Row Count 20 (+ 2) % Row 9 \SetRowColor{white} .conf max berichtgrootte & message\_size\_limit 1024 \tn % Row Count 22 (+ 2) % Row 10 \SetRowColor{LightBackground} .conf QoS instellen & qos \textless{}0,1 of 2\textgreater{} \tn % Row Count 24 (+ 2) % Row 11 \SetRowColor{white} clients installeren & sudo apt install mosquitto-clients \tn % Row Count 26 (+ 2) % Row 12 \SetRowColor{LightBackground} subscribe op topic & mosquitto\_sub -h localhost -t \textless{}topic\textgreater{} \tn % Row Count 28 (+ 2) % Row 13 \SetRowColor{white} Publish bericht & mosquitto\_pub -h localhost -t \textless{}topic\textgreater{} -m \textless{}"bericht"\textgreater{} \tn % Row Count 31 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.28 cm} x{4.72 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Node-Red}} \tn % Row 0 \SetRowColor{LightBackground} image & nodered/node-red \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} ports & "8080:1880" \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} data volume & /data \tn % Row Count 3 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.92 cm} x{4.08 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Docker}} \tn % Row 0 \SetRowColor{LightBackground} Toon actieve container & docker ps \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} Toon alle container (ook gestopte) & docker ps -a \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} Toon beschikbare images & docker images \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} Toon enkel image IDs & docker images -q \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} Start specifieke container & docker run \textless{}image\textgreater{} \tn % Row Count 10 (+ 2) % Row 5 \SetRowColor{white} Start container op achtergrond & docker run -d \tn % Row Count 12 (+ 2) % Row 6 \SetRowColor{LightBackground} Start container op een poort & docker run -p \textless{}port:port\textgreater{} \tn % Row Count 14 (+ 2) % Row 7 \SetRowColor{white} Geef container een naam & -{}-name \tn % Row Count 16 (+ 2) % Row 8 \SetRowColor{LightBackground} Command uitvoeren in actieve container & docker exec -it \textless{}container\textgreater{} \textless{}command\textgreater{} \tn % Row Count 18 (+ 2) % Row 9 \SetRowColor{white} Stop container & docker stop \textless{}container\textgreater{} \tn % Row Count 20 (+ 2) % Row 10 \SetRowColor{LightBackground} Verwijder container & docker rm \textless{}container\textgreater{} \tn % Row Count 22 (+ 2) % Row 11 \SetRowColor{white} Bouw image vanuit Dockerfile & docker build -t \textless{}image\textgreater{} \tn % Row Count 24 (+ 2) % Row 12 \SetRowColor{LightBackground} Mount directory in container & -v \textless{}directory\textgreater{}:\textless{}directory\textgreater{} \tn % Row Count 26 (+ 2) % Row 13 \SetRowColor{white} Forceer verwijderen container & docker rm -f \textless{}container\textgreater{} \tn % Row Count 28 (+ 2) % Row 14 \SetRowColor{LightBackground} Verwijder container incl volumes & docker rm -v \textless{}container\textgreater{} \tn % Row Count 30 (+ 2) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{3.92 cm} x{4.08 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Docker (cont)}} \tn % Row 15 \SetRowColor{LightBackground} Verwijder volumes & docker compose down -{}-volumes \tn % Row Count 2 (+ 2) % Row 16 \SetRowColor{white} Herbouw image & docker compose up -{}-build \tn % Row Count 4 (+ 2) % Row 17 \SetRowColor{LightBackground} Bekijk logs & docker compose logs \tn % Row Count 5 (+ 1) % Row 18 \SetRowColor{white} Volg logs in real-time & docker compose logs -{}-follow \tn % Row Count 7 (+ 2) % Row 19 \SetRowColor{LightBackground} Image halen uit Docker Hub & docker pull \textless{}image\textgreater{} \tn % Row Count 9 (+ 2) % Row 20 \SetRowColor{white} Commands uitvoeren zonder sudo & sudo usermod -aG docker \$USER (erna uitloggen) \tn % Row Count 12 (+ 3) % Row 21 \SetRowColor{LightBackground} Toon gebruikers ID + groep & id \tn % Row Count 14 (+ 2) % Row 22 \SetRowColor{white} Verander eigenaar van map & sudo chown \textless{}ID\textgreater{}:\textless{}groep\textgreater{} \textless{}map\textgreater{} \tn % Row Count 16 (+ 2) % Row 23 \SetRowColor{LightBackground} gebruiker en ww instellen & htpasswd -c htpasswd \textless{}gebruiker\textgreater{} \tn % Row Count 18 (+ 2) % Row 24 \SetRowColor{white} htpasswd installeren & sudo apt install apache2-utils \tn % Row Count 20 (+ 2) % Row 25 \SetRowColor{LightBackground} bestand uitvoerbaar maken & chmod u+x \textless{}bestand\textgreater{} \tn % Row Count 22 (+ 2) % Row 26 \SetRowColor{white} bestand uitvoeren & sudo ./\textless{}bestand\textgreater{} \tn % Row Count 23 (+ 1) % Row 27 \SetRowColor{LightBackground} token aanmaken & docker compose exec \textless{}naam .yml voor influxdb\textgreater{} influx auth list \textgreater{} token (containers moeten up zijn) \tn % Row Count 28 (+ 5) % Row 28 \SetRowColor{white} Toon alle container (up en down) & docker ps -a \tn % Row Count 30 (+ 2) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{3.92 cm} x{4.08 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Docker (cont)}} \tn % Row 29 \SetRowColor{LightBackground} Toon geïnstalleerde images & docker image ls \tn % Row Count 2 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.04 cm} x{4.96 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Github}} \tn % Row 0 \SetRowColor{LightBackground} Github installeren & sudo apt install git \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} repo van github clonen & git clone \textless{}url\textgreater{} (in home repo doen!) \tn % Row Count 4 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.76 cm} x{4.24 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Python In Container Uitvoeren}} \tn % Row 0 \SetRowColor{LightBackground} python image installeren & docker pull python \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} python map maken & mkdir \textless{}map\textgreater{} (bv: python) \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} vorige map koppelen aan container & docker run -{}-rm -it -v ./python:/\textless{}bv py\textgreater{} \textless{}python image\textgreater{} /bin/bash \tn % Row Count 8 (+ 4) % Row 3 \SetRowColor{white} uitloggen & exit \tn % Row Count 9 (+ 1) % Row 4 \SetRowColor{LightBackground} script in python map maken & vim python/\textless{}naam script\textgreater{} (bv test.py) \tn % Row Count 11 (+ 2) % Row 5 \SetRowColor{white} terug container starten & docker run -{}-rm -it -v ./python:/\textless{}bv py\textgreater{} \textless{}python image\textgreater{} /bin/bash \tn % Row Count 15 (+ 4) % Row 6 \SetRowColor{LightBackground} naar py map gaan & cd \textless{}gekozen mapnaam\textgreater{} (bv py/) \tn % Row Count 17 (+ 2) % Row 7 \SetRowColor{white} kijken of script erin staat & ls \tn % Row Count 19 (+ 2) % Row 8 \SetRowColor{LightBackground} script testen & python \textless{}naam script\textgreater{} (bv test.py) \tn % Row Count 21 (+ 2) % Row 9 \SetRowColor{white} script extern in container uitvoeren & docker run -{}-rm -it -v ./python:/py \textless{}image python\textgreater{} python \textless{}pad bv /py/test.py\textgreater{} \tn % Row Count 25 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.48 cm} x{5.52 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Dockerfiles (python)}} \tn % Row 0 \SetRowColor{LightBackground} Dockerfile maken & vim Dockerfile (let op hoofdletter) \tn % Row Count 2 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}